The default bug view has changed. See this FAQ.

ENCTYPE=multipart file upload does not work

RESOLVED FIXED in M15

Status

()

Core
HTML: Form Submission
P3
major
RESOLVED FIXED
18 years ago
15 years ago

People

(Reporter: Frank Tang, Assigned: Eric Pollmann)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [TESTCASE] file upload data not submitted correctly, URL)

Attachments

(5 attachments)

(Reporter)

Description

18 years ago
Somehow the form submission w/ multipart does not work. Which mean we cannot do
file upload. Try the form and cgi script.
(Reporter)

Updated

18 years ago
Blocks: 7973
(Reporter)

Updated

18 years ago
(Reporter)

Comment 1

18 years ago
also we have the local copy of that in
http://cgi-lib.stanford.edu/cgi-lib/ex/perl5/fup.html (w/ perl script of cgi)

Updated

18 years ago
Blocks: 7228

Comment 2

18 years ago
Bug #7973 was "fixed" in M7, but is dependent upon this to work.

Comment 3

18 years ago
If you don't have another test page, try the one we set up at:

http://publish.aps.org/esub/apstest/test.html

It handles a single file upload test case using Lincoln Stein's
CGI.pm perl module to process the result. Works for us since Netscape 2.x
(but not even now for MSIE 4.5 on the Mac - some MSIE's work).

-- Arthur Smith (apsmith@aps.org)

Updated

18 years ago
Whiteboard: [MAKINGTEST] christian@wenz.org

Comment 4

18 years ago
Created attachment 780 [details]
file upload form

Updated

18 years ago
Whiteboard: [MAKINGTEST] christian@wenz.org → [TESTCASE] file upload data not submitted correctly

Comment 5

18 years ago
Overview Description: form file upload feature does not work
Steps to reproduce: install a cgi-script capable of handling file uploads or use
the page at http://publish.aps.org/esub/apstest/test.html; enter the filename of
a local file in the textbox and click on "submit this file"
Actual Results: nothing happens, to response from the server
Expected Results: the server to print out a new page, showing the contents of
the uploaded file
Build Date & Platform: occurs M7 and current daily build (Win32)
                       does not occur on IE3+ and NN3+ (Win32) [there, the
server does respond]
Additional information: dind't touch the html file from
http://publish.aps.org/esub/apstest/test.html, is it cannot be simplified
further.
The file data does not seem to be submitted correctly (maybe no correct MIME
encoding / MIME separators?), making the script go nuts. There is no entry in
the server logs when calling the script from M7.

Comment 6

18 years ago
It appears in pages that has multiple form tags on it - see www.myevents.com -
try uploading a file.

Comment 7

18 years ago
Isn't this dogfood because we cannot create bugzilla attachments without this?
(Assignee)

Updated

18 years ago
Status: NEW → ASSIGNED
Target Milestone: M14 → M12
(Assignee)

Comment 8

18 years ago
Bumping up priority.
(Assignee)

Updated

18 years ago
Depends on: 13997
(Assignee)

Comment 9

18 years ago
Need to fix the crash first, of course :)
(Assignee)

Comment 10

18 years ago
Just checked in a fix.
To verify, try to attach a file to this bug using apprunner.  If it works, the
bug is fixed.  Note that, at least on Linux, you must select a file from the
current directory.  This is being worked on - see bug 15317
(Assignee)

Updated

18 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
(Assignee)

Comment 11

18 years ago
Just checked in a fix.
To verify, try to attach a file to this bug using apprunner.  If it works, the
bug is fixed.  Note that, at least on Linux, you must select a file from the
current directory.  This is being worked on - see bug 15317

Comment 12

18 years ago
I'm currently trying to upload a file using the 1999101808 build under NT...
it's been 'Transferring data' for about ten minutes so far (and that file ain't
that huge). I'll update if/when the upload finishes...

Comment 13

18 years ago
OK, I've been trying all morning to upload a file to bugzilla using the
1999101808 build on NT. Is something else broken, is this bug not fixed...
anyone have an idea? Thanks!
(Assignee)

Comment 14

18 years ago
Checking this out...

Updated

18 years ago
Blocks: 16950
(Assignee)

Updated

18 years ago
Status: RESOLVED → REOPENED
(Assignee)

Comment 15

18 years ago
This looks like it was caused by some changes recently made to Necko's http
library.  The form upload data is no longer getting written at all.

Rick, is this something you are aware of?  There is a test case in this bug.
Another is at http://blueviper/forms/multipart2.html.  Using this testcase, and
a simple server, I observed this data being posted:

pollmann blueviper(43):~> echoserver.prompt
Listening for clients on port 8000.
--------Got a new client.
POST /echo.cgi HTTP/1.0
host: blueviper:8000
accept: */*
user-agent: Mozilla/5.0 [en-US] (Linux; I)
referer: http://blueviper/forms/multipart2.html
--------Client hung up, responding.
--------Done.

But at the same time, the form post data file is correct and exists in /tmp.
This seems to be related to some recent changes you've made breaking apart and
improving nsHTTPRequest::Build, and the error seems centered around
nsHTTPRequest::OnStopRequest where the post data stream is asynchronously
written to the server.  Any ideas?  Do you want this bug?
(Assignee)

Updated

18 years ago
Resolution: FIXED → ---
(Assignee)

Updated

18 years ago
Status: REOPENED → ASSIGNED
(Assignee)

Comment 16

18 years ago
Changes to fix this problem have been checked in, still working on getting this.

Updated

18 years ago
Blocks: 17907
(Assignee)

Comment 17

18 years ago
After careful consideration, I've decided that I probably won't get this bug in
for M12.  Currently I have nearly 50 bugs scheduled for M13, so there is a
possibility that this bug may need to be moved out farther still.

Comment 18

18 years ago
QA Contact update.
(Assignee)

Comment 19

18 years ago
Created attachment 3495 [details] [diff] [review]
Test upload with M12
(Assignee)

Updated

18 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago18 years ago
Resolution: --- → FIXED
(Assignee)

Comment 20

18 years ago
Whatever changes had happened to break my fix seem to have reversed.  It works
for me now, so I'm marking it fixed.  Cool.  :)

Comment 21

17 years ago
Doesn't work on:
- MacOS86 2000-02-01-09 Commercial build
Can't upload file...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Comment 22

17 years ago
Still broken for MacOS86 2000-02-08-17 mozilla build.  Tested against Win32 and
Linux builds of same date and they work fine.  

Used the http://publish.aps.org/esub/apstest/test.html link.
(Assignee)

Updated

17 years ago
Target Milestone: M13 → M15

Comment 23

17 years ago
Does not work on Win32 2000021608 build on Windows 98.

Used this testcase:

http://publish.aps.org/esub/apstest/test.html

I also tried it with a file-submission form on a private site of mine, and it
didn't work, either. The application churns but nothing else happens (the form
never seems to be submitted)
(Assignee)

Comment 24

17 years ago
I just tested at:

http://publish.aps.org/esub/apstest/test.html

And posting worked fine for me.  Re-closing.  If you are still having problems,
please Reopen and give details such as platform, size of file, file nemae, ...

Note also that it may take a long time for larger files to upload to the
server.  Thanks!
Status: REOPENED → RESOLVED
Last Resolved: 18 years ago17 years ago
Resolution: --- → FIXED

Comment 25

17 years ago
Created attachment 8251 [details]
upload test of text doc - win98

Comment 26

17 years ago
Created attachment 8253 [details]
upload test html doc for MacOS9

Comment 27

17 years ago
Created attachment 8257 [details]
upload test html file for linux6

Comment 28

17 years ago
Marking VERIFIED FIXED on:
- MacOS9 2000-05-02-08-M15 Commercial
- Linux6 2000-05-02-08-M15 Commercial
- Win98  2000-05-02-08-M15 Commercial
Status: RESOLVED → VERIFIED

Updated

17 years ago
No longer blocks: 17907

Comment 29

15 years ago
It still doesn't work, if the file doesn't exits (or if the empty filename is
specified).
Here is a cgi-script to reproduce it: put it into a cgi-bin directory, then go
to cgi-bin/env?form 
This will show a form with a "file" input and a "submit" button. 
If you just push "submit" - it will never never return...
If you enter a valid (existing) path into the input field and submit again, 
you'll see a print out of the environment and the content of the file...
This is especially bad because there is no way to check whether the file exists
on the client side :-(

#!/bin/csh -f

if ($?QUERY_STRING) then
   if ("$QUERY_STRING" == "form")  then
      cat <<EOF
Content-type: text/html;"


<html>
<body>
<form action=env method=post enctype="multipart/form-data">
<input type=file name=file><br>
<input type=submit name=sub value="Submit">
</form>
</html>
EOF   
      exit
   endif
endif


echo "Content-type: text/plain"
echo ""
echo ""
echo "**** COMMAND: $0 ****"
env

if ("$REQUEST_METHOD" == "POST") then
   echo $CONTENT_LENGTH
   head -c $CONTENT_LENGTH
endif


Status: VERIFIED → REOPENED
Resolution: FIXED → ---

Comment 30

15 years ago
Works fine. Please use a recent nightly build and test it again. If you are
using 0.9.7, see bug 116210.
Status: REOPENED → RESOLVED
Last Resolved: 17 years ago15 years ago
Resolution: --- → FIXED

Updated

15 years ago
QA Contact: ckritzer → bsharma
You need to log in before you can comment on or make changes to this bug.