You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by John Schmitt <Jo...@amat.com> on 1999/10/02 00:11:42 UTC

config/5091: Form handling: Upload = server error when no file is specified

>Number:         5091
>Category:       config
>Synopsis:       Form handling: Upload = server error when no file is specified
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Oct  1 15:20:01 PDT 1999
>Last-Modified:
>Originator:     John_Schmitt@amat.com
>Organization:
apache
>Release:        1.3.6
>Environment:
Linux 2.2.5-15 (Redhat 6.0 distrib).  Perl 5.005, w/ CGI.pm
>Description:
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."

When running the same script using NetscapeFastrack/Unix instead of Apache/Linux,
this bug is not encountered.  I am not absolutely sure of which software
is faulty, but suspect Apache, and am thankful for the free Apache server regardless.
>How-To-Repeat:
http://www.terminalp.com/scripts/file_upload.shtml
the above URL provides the sample code which uniquely does not work on Apache/Linux.

>Fix:
Perhaps there is an HTML-side fix where you can give the <INPUT Type=FILE> a default value, so that
it is not null passed to Apache.  This is an unknown workaround, and a true
fix may need another patch to apatchy.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or      ]
["Re: general/1098:").  If the subject doesn't match this       ]
[pattern, your message will be misfiled and ignored.  The       ]
["apbugs" address is not added to the Cc line of messages from  ]
[the database automatically because of the potential for mail   ]
[loops.  If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request from a  ]
[developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]