Summary: | REGRESSION (r66452): Sending of multipart forms with files is broken | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Naofumi Kagami <naofumi> | ||||||||||||
Component: | Forms | Assignee: | Jian Li <jianli> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Critical | CC: | ap, egarcia, jianli | ||||||||||||
Priority: | P1 | Keywords: | Regression | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||
Hardware: | Mac (Intel) | ||||||||||||||
OS: | OS X 10.6 | ||||||||||||||
Attachments: |
|
Description
Naofumi Kagami
2010-09-02 19:28:11 PDT
Created attachment 66456 [details]
Test multipart form
Created attachment 66457 [details]
Webkit inspector screenshot without Content-Type
Created attachment 66458 [details]
Safari screenshot with Content-Type
The posted form serialization is completely broken - file content comes first without even a boundary line before it. I didn't try to regress this, but r66452 seems to be the only suspicious revision lately. (In reply to comment #4) > The posted form serialization is completely broken - file content comes first without even a boundary line before it. > > I didn't try to regress this, but r66452 seems to be the only suspicious revision lately. I have a fix for content-type missing problem. Alex, I do not see the problem you mentioned: file content comes without a boundary line before it. The attached screen shot does not show this problem. Neither can I reproduce this in my local machine. Could you please tell me how you reproduce it? Thanks. Created attachment 66539 [details]
Proposed Patch
> Could you please tell me how you reproduce it? I just ran "nc -l 8000" on command line, and changed form action to http://127.0.0.1:8000/, so I could see what was actually sent. Created attachment 66542 [details]
nc output
This patch has been landed in <http://trac.webkit.org/changeset/66773>, but please take a look at the above comments. (In reply to comment #9) > This patch has been landed in <http://trac.webkit.org/changeset/66773>, but please take a look at the above comments. I tried your way to dump the response but I did not see any problem. I think if this is broken (the boundary string is missing), we should see a lot of broken layout tests. Can you double-check that you can reproduce this locally without any other interfering changes? Can you attach the output if you do see such bad things happen? Thanks. > Can you attach the output Yes, it's already attached. I'm seeing this with a local build of r66738, no local changes. (In reply to comment #11) > > Can you attach the output > > Yes, it's already attached. I'm seeing this with a local build of r66738, no local changes. I ran the same script as yours and did not see any problem. Here is what I saw: POST / HTTP/1.1 Host: 127.0.0.1:8000 ... ------WebKitFormBoundaryJZxbkQBhniZYn9IA Content-Disposition: form-data; name="username" 123 ------WebKitFormBoundaryJZxbkQBhniZYn9IA Content-Disposition: form-data; name="submitfile"; filename="45159.html" Content-Type: text/html <html> ... ------WebKitFormBoundaryJZxbkQBhniZYn9IA Content-Disposition: form-data; name="submit" submit ------WebKitFormBoundaryJZxbkQBhniZYn9IA-- Can you check if the following tests are running OK in your local machine? run-web-tests --debug http/tests/local/formdata Thanks. OK, I see what happened - control codes in my GIF file ate some lines of terminal output, exactly as many as it was needed to hide the boundary. The actual content sent over the wire is not malformed. Sorry for my stubborn confusion! (In reply to comment #13) > OK, I see what happened - control codes in my GIF file ate some lines of terminal output, exactly as many as it was needed to hide the boundary. The actual content sent over the wire is not malformed. > > Sorry for my stubborn confusion! Glad to hear that this mystery is solved. I should not get this stupid bug in first. Now we have better test to guard against this from happening again. |