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:[EMAIL PROTECTED] On Behalf Of Joe Schaefer
> Sent: Friday, June 18, 2004 12:25 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [mp2] losing POST vars with 
> PerlOutputFilterHandler+mod_proxy
> 
> 
> "Eric J. Hansen" <[EMAIL PROTECTED]> 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_
> 
> [....]



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to