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 Sat, 09 Oct 1999 02:20:01 GMT
The following reply was made to PR config/5091; it has been noted by GNATS.

From: John_Schmitt@amat.com
To: apbugs@hyperreal.org, 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 Lstein@cshl.org (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.
 
 
 

Mime
View raw message