www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John_Schm...@amat.com
Subject Re: config/5091: Form handling: Upload = server error when no file is specified
Date Fri, 08 Oct 1999 20:01:36 GMT

You can close this bug listing (5091).
This ended up being a CGI.pm issue.  I've identified it and fixed it, and sent
the following to Lstein@cshl.org (CGI.pm owner).


CGI.pm version 1.19 1999/08/31
Apache 1.3.6, Linux 2.2.5-15 (Redhat 6.0 distrib).  Perl 5.005
Here's the bug:
I'm testing using a html & perl script pair of files that are commonly used
for file-upload.  They are publicly available on:

When a file is specified, it will succeed by uploading the file and displaying
the results page.

However, if the filename is left blank, there is a server error,
and the apache log file indicates "premature end of script headers."
Here's the fix:
in line 2862 of CGI.pm, change
     unless (defined $filename) {
     unless (defined $filename & $filename gt "") {

This works.  Files are still uploaded, and it doesn't abort when a filename
isn't specified.
I only suspect that the problem was that the Netscape browser and/or Apache was
sending a filename that "existed", but was essentially NULL.

View raw message