[Webkit-unassigned] [Bug 20668] New: multipart/form-data does not always include Content-type for submitted files

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 5 09:58:19 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=20668

           Summary: multipart/form-data does not always include Content-type
                    for submitted files
           Product: WebKit
           Version: 525.x (Safari 3.1)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: z3gator at gmail.com


This was observed using Safari on Mac OS X 10.4 and Windows XP, and Google
Chrome on Windows XP, so it is believed to be common to all platforms.  The
fundamental problem is that the Content-type for a file submitted using input
type=file is not set if the file type (extension?) is not "recognized" (sorry,
but I don't know what determines exactly when it will be set and when it will
not).  For example, submitting an Excel (*.xls) file from a client that does
not have Excel installed results in the file data being sent with no
Content-type specified.  Other browsers set the Content-type to
application/octec-stream in this case, and my interpretation of the spec
implies that is the correct behavior.

One serious implication of this flaw is that the Struts2 FileUploadInterceptor
expects the Content-type to be set for each uploaded file, and when it is
missing, the interceptor emits an error and fails to set any of the parameters
that are later expected/used by the Struts2 action class to process the
file(s).  The net result is that users using applications built on Struts2 are
not able to upload files using webkit-based browsers.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list