git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 28, 2011, 22:32 UTC
Message-ID
<201111282332.07276.jnareb@gmail.com>
In-Reply-To
<CAKD0UuzsV7A_j8YD4b0Lb95L2NcRcSu5PH8C9aZQmEx3tOuQjQ@mail.gmail.com>
Jürgen Kreileder wrote:
Show 21 quoted lines
> On Mon, Nov 28, 2011 at 21:13, Jürgen Kreileder <jk@blackdown.de> wrote:
> > On Mon, Nov 28, 2011 at 17:54, Jakub Narebski <jnareb@gmail.com> 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 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
Previous: Jürgen KreilederNext: Jürgen Kreileder
Message 6 of 8 in “gitweb: in-page errors don't work with mod_perl”
  1. Jürgen KreilederNov 27, 2011
  2. Jakub NarebskiNov 27, 2011
  3. Jürgen KreilederNov 28, 2011
  4. Jürgen KreilederNov 28, 2011
  5. Jürgen KreilederNov 28, 2011
  6. Jakub NarebskiNov 28, 2011
  7. Jürgen KreilederNov 28, 2011
  8. Jakub NarebskiNov 29, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.