From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.6+) Gecko/20011126 BuildID: 2001112603 Prior to 0.9.6, an empty file input was submitted. With 0.9.6 and later builds, file inputs are submitted only if the user specifies a file name. While this is allowed (see http://www.w3.org/TR/html4/interact/forms.html#h-17.13.2), it's not required, and it's inconsistent with IE and previous versions of Mozilla. Reproducible: Always Steps to Reproduce: 1. Create a form with a file input that submits to a server you can debug. 2. Submit the form without specifying a file. 3. Inspect the request received by the server. Actual Results: The file input's data is absent from the request. Expected Results: The file input should be represented as a name=value pair in the request, with an empty value. I tested this on Windows 2000 and Mac OS 9.0.4.
Created attachment 59177 [details] Stub test case. This attachment provides a shell for a test case; the form must be modified to submit its data to a script that does something useful like displaying the message body.
16 years ago
Taking. I did this on purpose, I was under the impression that the old code did this. Simple change in nsHTMLInputElement::IsSuccessful().
*** Bug 111998 has been marked as a duplicate of this bug. ***
Can you look at bug 111998 ? It's a blocker to me as it makes SourceForge File Release unusable.
It looks as though you are having the same problem. This will be fixed tonight or tomorrow night (depending on how fast I get r=).
*** Bug 112202 has been marked as a duplicate of this bug. ***
Created attachment 59495 [details] [diff] [review] Fix This fixes it for a POST form I wrote. We were explicitly checking to see if value was empty or not in IsSuccessful(). Now file controls are always successful.
Comment on attachment 59495 [details] [diff] [review] Fix sr=jst
Comment on attachment 59495 [details] [diff] [review] Fix r= alexsavulov
Fix checked in.
Works for me with 2001112903 on Windows 2000.
verifying on windows 2002-01-07-03-trunk and 2002-01-04-08-trunk.This actually looks like a dupe of bug 116210 "File upload stalls when file name is invalid or on EACCES"