Bug 21823
Summary: | File uploads do not include content-type or filename | ||
---|---|---|---|
Product: | WebKit | Reporter: | André Arko <andre> |
Component: | Forms | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | darin, sam |
Priority: | P1 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Mac | ||
OS: | OS X 10.5 |
André Arko
This is a regression from Safari 3.1.
When uploading a file (via an input with type=file), WebKit does not include the filename in the Content-disposition, nor does it include the Content-type.
Here is the same file being uploaded to the same form from WebKit, Safari 3, and Firefox 3:
WebKit nightly r37605
------WebKitFormBoundarylihkUpnJqw20hDRG
Content-Disposition: form-data; name="file_0"
âPNG
[snip]
Safari 3.1.2 (5525.20.1)
------WebKitFormBoundarypGO+lW1hYvophJMd
Content-Disposition: form-data; name="file_0"; filename="andre.png"
Content-Type: image/png
âPNG
[snip]
Firefox 3 (Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3)
-----------------------------168072824752491622650073
Content-Disposition: form-data; name="file_0"; filename="andre.png"
Content-Type: image/png
âPNG
[snip]
Because WebKit does not include the filename or the content-type, I can't tell that the form-data being posted is a file. If needed, I can supply the specific file, but both I and a co-worker were able to reproduce the issue with multiple files of different types (including at least PNGs and JPGs). If there's anything else that would be helpful to reproduce this issue, just let me know. Thanks.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
André Arko
This appears to be fixed as of r38688.