DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38742>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38742

           Summary: Fails to apply fieldname
           Product: Commons
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: File Upload
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


Fileupload fails when parsing this example multipart request from RFC 1867. It
appears that the attachmements "file1.txt" and "file2.gif" are associateed with
the same form field name, "pics". However, since the name "pics" is specified in
the content-disposition header on line [08], it is lost when the
content-disposition header on lines [12] and [17] are parsed. The attachments
are returned in the FileItem but the fieldName properties are null.

I believe the name property from line [8] should be persisted and applied to
both file parts (file1.txt and file2.gif).

[01] Content-type: multipart/form-data, boundary=AaB03x
[02]
[03] --AaB03x
[04] content-disposition: form-data; name="field1"
[05]
[06] Joe Blow
[07] --AaB03x
[08] content-disposition: form-data; name="pics"
[09] Content-type: multipart/mixed, boundary=BbC04y
[10]
[11] --BbC04y
[12] Content-disposition: attachment; filename="file1.txt"
[13] Content-Type: text/plain
[14]
[15] ... contents of file1.txt ...
[16] --BbC04y
[17] Content-disposition: attachment; filename="file2.gif"
[18] Content-type: image/gif
[19] Content-Transfer-Encoding: binary
[20]
[21] ...contents of file2.gif...
[22] --BbC04y--
[23] --AaB03x--

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to