perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Michaels <>
Subject Re: Adding Post Data to a SubRequest
Date Fri, 16 Dec 2011 20:28:26 GMT
Interesting. I appreciate the feedback! So far I have basic proxying 
working nicely in LWP, so I'm only delayed about a week.

I ran into Apache segfaults too when using subrequests. I debugged it by 
adding logging points throughout my code, and if a segfault was hit 
after a specific log point, I knew the segfault was caused by the code 
that came after the one particular log point.

In my case, it turned out to be how I was passing subrequest headers off 
to a filter. I was able to replace the filter with a while loop, and 
that got rid of the segfaults for me. I realize not everyone can replace 
their filters with while loops, but that's what worked for me!

Thanks again, Torsten and Andre, for your wisdom and experience. I 
deeply appreciate it! =)

Warm Regards,
Jordan Michaels

On 12/15/2011 11:40 PM, André Warnier wrote:
> Hi.
> If it may contribute something to the question :
> I have a case where, within a response handler, I need to make a call to
> a back-end Tomcat through mod_jk (a simple GET, not a POST). I initially
> tried to do this through a sub-request, and was getting segfaults in
> Apache for my trouble.
> Rather than investigating this, I switched to making the call through
> LWP, and it has been working fine for a couple of years, on a variety of
> systems and Apache versions.
> Jordan Michaels wrote:
>> Well, I do need mod_rewrite to be run. A lot of our users use SES
>> url's and then use rewrite rules to parse them out. I also have
>> specific requests to leave .htaccess functionality in there (for
>> secured directories and so forth).
>> So yeah, the more typical Apache functionality we can leave in the
>> better. It's a pretty tall order.
>> I've configured my perl module using AddHandler in Apache, like so:
>> AddHandler perl-script [my file extensions]
>> PerlRequire /path/to/
>> PerlHandler mymod
>> and that seems to allow me to do everything I'm needing to do so far,
>> but I admit I haven't tested it thoroughly so far. I'm still trying to
>> get POST data passed.
>> Thank you again, very much, for your help!
>> Warm Regards,
>> Jordan Michaels
>> On 12/15/2011 12:17 PM, Torsten Förtsch wrote:
>>> On Thursday, 15 December 2011 12:09:05 Jordan Michaels wrote:
>>>> The module I'm working on updates the headers and proxies the requests
>>>> for specific file types off to Tomcat HTTP and AJP ports.
>>> Then maybe you don't need subrequests at all. A translation handler
>>> may be
>>> sufficient. Even an internal redirect will do if invoked before the
>>> response
>>> phase. (The core response handler calls ap_discard_request_body.)
>>> Torsten Förtsch

View raw message