Re: gitweb: in-page errors don't work with mod_perl

5 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: gitweb: in-page errors don't work with mod_perl

From: Jürgen Kreileder <hidden>
Date: 2016-06-15 22:52:32

On Mon, Nov 28, 2011 at 17:54, Jakub Narebski [off-list ref] wrote:
 [...]
The configuration is very similar.  Perhaps that is the difference between
Apache 2.0.x (mine) and Apache 2.2.x (yours).

Does adding `$r->err_headers_out();` before `$r->status(200);` helps?
I'm grasping at straws here.  mod_perl documentation is not very helpful.
Doesn't help unfortunately.  It's hard to find any information about
this on the net (except for your comment on stackoverflow :).

The only way to get mod_perl to return a custom error message with
correct status code I've found so far is $r->custom_response($status,
$msg).  Unfortunately mod_perl then ignores header I set, e.g.
content-type.


Juergen

Re: gitweb: in-page errors don't work with mod_perl

From: Jürgen Kreileder <hidden>
Date: 2016-06-15 22:52:32

On Mon, Nov 28, 2011 at 21:13, Jürgen Kreileder [off-list ref] wrote:
On Mon, Nov 28, 2011 at 17:54, Jakub Narebski [off-list ref] wrote:
 [...]
quoted
The configuration is very similar.  Perhaps that is the difference between
Apache 2.0.x (mine) and Apache 2.2.x (yours).

Does adding `$r->err_headers_out();` before `$r->status(200);` helps?
I'm grasping at straws here.  mod_perl documentation is not very helpful.
Doesn't help unfortunately.  It's hard to find any information about
this on the net (except for your comment on stackoverflow :).

The only way to get mod_perl to return a custom error message with
correct status code I've found so far is $r->custom_response($status,
$msg).  Unfortunately mod_perl then ignores headers I set, e.g.
content-type.
I guess this explains it:
http://foertsch.name/ModPerl-Tricks/custom-content_type-with-custom_response.shtml
Requires quite some restructuring to gitweb.perl.


Juergen

Re: gitweb: in-page errors don't work with mod_perl

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:52:32

Jürgen Kreileder wrote:
On Mon, Nov 28, 2011 at 21:13, Jürgen Kreileder [off-list ref] wrote:
quoted
On Mon, Nov 28, 2011 at 17:54, Jakub Narebski [off-list ref] wrote:
 [...]
quoted
The configuration is very similar.  Perhaps that is the difference between
Apache 2.0.x (mine) and Apache 2.2.x (yours).

Does adding `$r->err_headers_out();` before `$r->status(200);` helps?
I'm grasping at straws here.  mod_perl documentation is not very helpful.
Doesn't help unfortunately.  It's hard to find any information about
this on the net (except for your comment on stackoverflow :).

The only way to get mod_perl to return a custom error message with
correct status code I've found so far is $r->custom_response($status,
$msg).  Unfortunately mod_perl then ignores headers I set, e.g.
content-type.
I guess this explains it:
http://foertsch.name/ModPerl-Tricks/custom-content_type-with-custom_response.shtml
Requires quite some restructuring to gitweb.perl.
I'm coming close to declaring that ModPerl::Registry is horribly broken
with respect to error pages created by CGI, and say that we don't support
it, removing mod_perl configuration examples from gitweb documentation.

WTF 'return Apache2::Const::DONE;' doesn't work with ModPerl::Registry?
It is supposed to work with native mod_perl scripts...

-- 
Jakub Narebski
Poland

Re: gitweb: in-page errors don't work with mod_perl

From: Jürgen Kreileder <hidden>
Date: 2016-06-15 22:52:32

On Mon, Nov 28, 2011 at 23:32, Jakub Narebski [off-list ref] wrote:
Jürgen Kreileder wrote:
quoted
On Mon, Nov 28, 2011 at 21:13, Jürgen Kreileder [off-list ref] wrote:
quoted
On Mon, Nov 28, 2011 at 17:54, Jakub Narebski [off-list ref] wrote:
 [...]
quoted
The configuration is very similar.  Perhaps that is the difference between
Apache 2.0.x (mine) and Apache 2.2.x (yours).

Does adding `$r->err_headers_out();` before `$r->status(200);` helps?
I'm grasping at straws here.  mod_perl documentation is not very helpful.
Doesn't help unfortunately.  It's hard to find any information about
this on the net (except for your comment on stackoverflow :).

The only way to get mod_perl to return a custom error message with
correct status code I've found so far is $r->custom_response($status,
$msg).  Unfortunately mod_perl then ignores headers I set, e.g.
content-type.
I guess this explains it:
http://foertsch.name/ModPerl-Tricks/custom-content_type-with-custom_response.shtml
Requires quite some restructuring to gitweb.perl.
I'm coming close to declaring that ModPerl::Registry is horribly broken
with respect to error pages created by CGI, and say that we don't support
it, removing mod_perl configuration examples from gitweb documentation.
Makes sense.  The benefits of mod_perl are properly small for gitweb anyway.


Juergen

-- 
http://blog.blackdown.de/
http://www.flickr.com/photos/jkreileder/

Re: gitweb: in-page errors don't work with mod_perl

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:52:32

Jürgen Kreileder wrote:
On Mon, Nov 28, 2011 at 23:32, Jakub Narebski [off-list ref] wrote:
quoted
Jürgen Kreileder wrote:
quoted
On Mon, Nov 28, 2011 at 21:13, Jürgen Kreileder [off-list ref] wrote:
quoted
On Mon, Nov 28, 2011 at 17:54, Jakub Narebski [off-list ref] wrote:
 [...]
quoted
The configuration is very similar.  Perhaps that is the difference between
Apache 2.0.x (mine) and Apache 2.2.x (yours).

Does adding `$r->err_headers_out();` before `$r->status(200);` helps?
I'm grasping at straws here.  mod_perl documentation is not very helpful.
Doesn't help unfortunately.  It's hard to find any information about
this on the net (except for your comment on stackoverflow :).

The only way to get mod_perl to return a custom error message with
correct status code I've found so far is $r->custom_response($status,
$msg).  Unfortunately mod_perl then ignores headers I set, e.g.
content-type.
I guess this explains it:
http://foertsch.name/ModPerl-Tricks/custom-content_type-with-custom_response.shtml
Requires quite some restructuring to gitweb.perl.
I'm coming close to declaring that ModPerl::Registry is horribly broken
with respect to error pages created by CGI, and say that we don't support
it, removing mod_perl configuration examples from gitweb documentation.
Makes sense.  The benefits of mod_perl are properly small for gitweb anyway.
Anyway you can run gitweb with FastCGI (supposedly - I don't know if it
was tested), which provides the same (or most of the) advantages that
mod_perl gives, without the troubles.  Just rename gitweb.cgi to
gitweb.fcgi and configure web server appropriately (and have FCGI Perl
module installed).

-- 
Jakub Narebski
Poland
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help