[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-modperl
Subject: Re: Porting Bricolage to mp2: TransHandler Interference
From: "David E. Wheeler" <david () kineticode ! com>
Date: 2008-04-24 22:35:07
Message-ID: 1D469297-A4AE-41A6-9B6F-4B1983DBE6F4 () kineticode ! com
[Download RAW message or body]
On Apr 24, 2008, at 02:20, Torsten Foertsch wrote:
> Well, I think I can shed some light on that mystery. When you use
> the "perl-script" handler instead of "modperl" then your C-level
> response
> handler is modperl_response_handler_cgi (see src/modules/perl/
> mod_perl.c).
> This function calls modperl_env_request_populate (see modperl_env.c)
> and that
> calls ap_add_cgi_vars (see httpd.../server/util_script.c). All that
> happens
> in the response phase *before* the PerlResponseHandler is called.
Well, I'm no C coder, but I get the idea. Sure enough, when I use the
"perl-script" handler (as we've been doing for mod_perl 1, of course),
I see:
Trans: /workflow/profile/desk/101/101/
Trans: /101/
Cleanup: /101/
Response: /workflow/profile/desk/101/101/
Cleanup: /workflow/profile/desk/101/101/
But when I switch to the "modperl" handler (which was a simple find-
and-replace, thank you very much), I see:
Trans: /workflow/profile/desk/101/101/
Response: /workflow/profile/desk/101/101/
Cleanup: /workflow/profile/desk/101/101/
*So* much better! So already Bricolage is better running on mod_perl 2
than on mod_perl 1. :-)
> Why the subreq is not set up if your transhandler is not used I can
> only
> guess. Maybe it sets $r->path_info explicitly maybe it sets $r-
> >filename so
> that the standard maptostorage handler sets path_info. But path_info
> is
> probably empty if your transhandler is not used.
It is odd, but it does seem like the perl-script handler is doing
something different if I've installed a TransHandler.
> Further I recall a problem/bug that if the PerlCleanupHandler is the
> only
> configured Perl handler for a request it is not called. But that
> does not
> seem to hit you since you have a (Trans|Access)Handler at least. If
> you think
> that may be the case try the threading mod_perl branch. There the
> problem is
> solved (http://svn.apache.org/repos/asf/perl/modperl/branches/threading
> ).
> That branch still does not work with perl 5.10.
I don't think that's related, but it's good to know that there is
ongoing work on this stuff.
Thanks a million for the detailed explanation!
Best,
David
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic