Scott et al.

After porting one of my mod_perl apps from 1 to 2, I thought that I
had it working but then later found that for some users, POST form
data was not available. In other words, when they would submit the
form data all of the CGI.pm param()'s were empty even though in my
Apache access_log I could see that they had made a POST request. About
50% of users were affected and I still have not found a pattern amongst
them that distinguishes them from those who are unaffected. GET
requests with form data from these same people seem to work fine
(although this app needs to POST it's data unfortunately).

Cool... exactly the same thing happened to me, except that it wasn't when I switched
from mp1 to mp2 (which I haven't done), it was when I upgraded from Jaguar to
Panther, which comes with 5.8.1RC3 and a pre-built Apache/mod_perl. So I'm still
using mp1, yet the exact same thing happens to me; all the POST values are lost.


I sniffed around and it seems to be that something is funky with the way that CGI.pm is initialising itself under mod_perl; remember that when a mod_perl process accesses $r->args, all future calls to that will return nothing. It seems to me that this is happening too early in the case of a POST, but it's not in my code anywhere... so I suspect it's buried somewhere in the bowels of Apache and CGI and their interactions with each other.

Seems I was luckier than Scott though since I had wrapped all calls to get parameters from CGI.pm with a few methods of my own. To get around the weirdness, I just replaced the instance of CGI.pm with an instance of Apache::Request, and everything started working again.

Not sure if this helps, but maybe it'll get you on the right track.

Cheers

Kyle Dawkins
Central Park Software



Reply via email to