The following reply was made to PR config/5091; it has been noted by GNATS.
From: [EMAIL PROTECTED] To: [EMAIL PROTECTED], apache-bugdb@apache.org Cc: Subject: Re: config/5091: Form handling: Upload = server error when no file is specified Date: Fri, 8 Oct 1999 13:01:36 -0700 Hi, 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 [EMAIL PROTECTED] (CGI.pm owner). Thanks, John --------------- 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: http://www.terminalp.com/scripts/file_upload.shtml 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) { to 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.