You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Alexander Haeckel <al...@s1997.tu-chemnitz.de> on 2000/12/01 13:41:51 UTC

Re: controling POST input with mod_perl

Hi,
thank you for your help.

Stas Bekman <st...@stason.org> writes:

> On 28 Nov 2000, Alexander Haeckel wrote:

> > I want to control the way a CGI program works by modifying the
> > parameters passed to it within a FixupHandler. For GET requests
> > everything works fine. But for POST requests the parameters seem to be
> > deleted after reading them. If the CGI program is a Perl script I get
> > the parameters within $r->pnotes to a modified Apache::PerlRun.pm as
> > PerlHandler to solve the problem. 
> 
> http://perl.apache.org/guide/snippets.html#Convert_a_POST_Request_into_a_GE
> http://perl.apache.org/guide/snippets.html#Redirect_a_POST_Request_Forward
> http://perl.apache.org/guide/snippets.html#Reading_POST_Data_then_Redirect
> 

I already knew these snippets before my posting. But I think  they
don't fit my problem, because some of the scripts (not written by me)
I have to maintain  behave differently depending if the request was
GET or POST. So I can't simply transform the POST requests into GET
requests. One of the requirements I've got by my boss is to avoid
bigger modifications to third party scripts to do not restrict
upgradability, so I can't simply change the script.

Is there a way to use mod_perl to filter POST data, that has been sent to
a binary program, that expects a POST request?    

Thanks in advance,
Alexander Haeckel

-- 
There never was a good war or a bad peace.
                -- B. Franklin