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/11/28 15:38:01 UTC
controling POST input with mod_perl
Hi there,
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.
How can I get the parameters to a binary CGI program?
Thank you for your help,
Alexander
--
There never was a good war or a bad peace.
-- B. Franklin
Re: controling POST input with mod_perl
Posted by Alexander Haeckel <al...@s1997.tu-chemnitz.de>.
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
Re: controling POST input with mod_perl
Posted by Stas Bekman <st...@stason.org>.
On 28 Nov 2000, Alexander Haeckel wrote:
>
> Hi there,
>
> 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
>
> How can I get the parameters to a binary CGI program?
>
> Thank you for your help,
> Alexander
>
> --
> There never was a good war or a bad peace.
> -- B. Franklin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: modperl-unsubscribe@apache.org
> For additional commands, e-mail: modperl-help@apache.org
>
>
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://apachetoday.com http://jazzvalley.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/