netspinner_ltd has asked for the wisdom of the Perl Monks concerning the following question:

I've come across this problem with CGI.pm 3.01

  1. Set POST_MAX to 1MB
  2. Try to upload file > 1MB long
  3. CGI script hangs, generating no o/p

A bit of debugging shows that all goes well until the script tries to emit its results. After writing out its headers, it never seems to get past the final print of its HTML. The script correctly takes account of the return value of cgi_error(), and doesn't try to read the file (though CGI.pm apparently does read and discard the POST data, for some reason).

Has anyone seen this, or got a fix or explanation ? A bit of googling indicates that something similar has been seen before, but I haven't found any explanation for it.

Janitored by holli - fixed formatting

  • Comment on CGI.pm 3.01, POST_MAX and hanging CGI script

Replies are listed 'Best First'.
Re: CGI.pm 3.01, POST_MAX and hanging CGI script
by wazoox (Prior) on May 26, 2005 at 12:54 UTC
    I have no idea of what went wrong, but perhaps should you post a code example that we can try, and furthermore if it doesn't send anything to the browser, try outputting to the httpd logfile using warn (to see if the script is frozen somewhere in the CGI call or elsewhere).