[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    mp2, STDIN/POST is clobbered by CGI->new($r);
From:       Ashley Pond V <ashley.pond.v () gmail ! com>
Date:       2008-08-29 22:35:13
Message-ID: A5D293AC-BE07-434A-8DDD-BD904F3E4705 () gmail ! com
[Download RAW message or body]

Hello everybody.

I've got an access handler that is checking some arguments before  
passing the request off with DECLINED or redirecting back to login/home.

The first version broke PHP forms that used POST by using this idiom  
to check for arguments:

   my $cgi = CGI->new($r);

CGI, I am guessing, reads STDIN for the POST args, emptying it  
(eof'ing it?). So, when an authenticated request is DECLINED and PHP  
is next in line, there is nothing to read and the $_POST is empty.

I realized I only needed to check GET args for the session info so  
munging $r->args is fine for my situation. Problem solved but now I'm  
curious.

How could you read the POST body without clobbering it to hand off to  
some PHP, or whatever is next in line? My CGI version in this  
environment is 3.15.

Thanks!
-Ashley

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic