httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [mp2] losing POST vars with PerlOutputFilterHandler+mod_proxy
Date Fri, 18 Jun 2004 12:45:05 GMT
That should probably go somewhere into A-R docs?

Eric J. Hansen wrote:
> Thanks, Joe!  I implemented your suggestion (1), and the following works nicely...
> (added to my request filter)
> 
> sub init : FilterInitHandler {
>         my $f = shift;
>         my $r = $f->r;
> 
>         # instantiate an Apache::Request object here so we have access to
>         # CGI params during the output filter
>         my $ApReq = Apache::Request->new($r);
>         return 1;
> }
> 
> sub handler : FilterRequestHandler FilterHasInitHandler(\&init) {
> ........
> 
> 
> My output filter stayed the same -- I simply (re)instantiate Apache::Request,
> then $ApReq->param, and I've got access to the form variables.  :)
> 
> cheers
> Eric
> 
> 
> 
> 
> 
>>-----Original Message-----
>>From: news [mailto:news@sea.gmane.org] On Behalf Of Joe Schaefer
>>Sent: Friday, June 18, 2004 12:25 AM
>>To: modperl@perl.apache.org
>>Subject: Re: [mp2] losing POST vars with 
>>PerlOutputFilterHandler+mod_proxy
>>
>>
>>"Eric J. Hansen" <ehansen@worldmachine.com> writes:
>>
>>
>>>I'm having a problem whereby I can't access POST CGI variables when 
>>>using an output filter (PerlOutputFilterHandler) alongside mod_proxy. 
>>>Parameters on the URL (GET) work just fine, its just the POST 
>>>variables that are missing.
>>>
>>>My setup is that I'm using a mod_proxy reverse proxy to fetch some 
>>>remote content, then doing some analysis on the content using an 
>>>output filter.
>>
>>The problem is likely that the apreq filter has not been added to 
>>the input filter chain in time to read the POST data.
>>
>>There are two solutions to this problem:
>>
>>  1) Write a filter init handler for you filter that instantiates an
>>     Apache::Request object.  See
>>
>>     http://perl.apache.org/docs/2.0/api/Apache/Filter.html#C_FilterInitHandler_
>>
>>[....]
> 
> 
> 
> 


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Mime
View raw message