in reply to getting sometimes empty cgi form with post
Don't know what the problem is... so just two suggestions that might help to narrow down on the issue:
Check if you can actually read the raw query string from STDIN (before instantiating the CGI object), like this
if ($ENV{REQUEST_METHOD} eq 'POST') { my $n = read STDIN, my $query, $ENV{CONTENT_LENGTH}; warn $! unless defined $n; # (-> check error_log) # ... check $query }
(just for debugging purposes, of course — handling query strings yourself is generally considered a no no :)
Try CGI::Simple instead of CGI.pm. It's more or less a drop-in replacement, as long as you stick to the OO style usage.
Those tests might help to figure out whether it's maybe an obscure bug with the CGI module (not entirely impossible), or if it's that the socket (or the pipe from apache to the CGI process) is being closed prematurely for whatever reason, or some such.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: getting sometimes empty cgi form with post
by david2008 (Scribe) on Mar 08, 2010 at 08:49 UTC | |
by almut (Canon) on Mar 08, 2010 at 13:40 UTC | |
by david2008 (Scribe) on Mar 10, 2010 at 10:17 UTC | |
by Anonymous Monk on Mar 10, 2010 at 10:46 UTC | |
by Anonymous Monk on Mar 08, 2010 at 08:56 UTC | |
by david2008 (Scribe) on Mar 08, 2010 at 09:02 UTC |