Issue Details (XML | Word | Printable)

Key: FILEUPLOAD-39
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Benjamin Riefenstahl
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons FileUpload

[fileupload] Content-Type with quoted boundary doesn't work

Created: 02/Jun/05 08:29 PM   Updated: 09/Mar/07 08:31 PM
Return to search
Component/s: None
Affects Version/s: 1.0 Final
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
Operating System: other
Platform: All

Bugzilla Id: 35183


 Description  « Hide
I am using a MIME framework that creates headers and bodies
for multiparts. It creates the Content-Type as e.g. (this is
a single line in the original header):

Content-Type: multipart/form-data; boundary="-----
=_N0U3NTVGRkNCOEQ4MEE3MTBDNzZDOEMyQjU0MkIyMDg="

Later the parts are separated by

------- =_N0U3NTVGRkNCOEQ4MEE3MTBDNzZDOEMyQjU0MkIyMDg=

The package doesn't recognise any fields in the request.
If OTOH I remove the quotes from the Content-Type, it works.

Inspection of the code in CVS seems to indicate that the
problem is that ParameterParser.parseQuotedToken()
recognises quotes but doesn't remove them from the value.
So FileUploadBase.getBoundary() gets the boundary with the
quotes and compares it to actual data without quotes.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Benjamin Riefenstahl added a comment - 02/Jun/05 08:41 PM
(In reply to comment #0)
> [...] ParameterParser.parseQuotedToken() recognises quotes
> but doesn't remove them from the value. [...]

Looking closer, it seems that ParameterParser.getToken() is
supposed to remove the quotes later in parseQuotedToken().
Still the observation stands that there is a problem somewhere
in the scenario described.


Benjamin Riefenstahl added a comment - 05/Jun/05 07:59 AM
Sorry about the noise. I was looking at the CVS code, but testing
with 1.0. When I actually use the CVS code, the bug is fixed.

Henri Yandell made changes - 16/May/06 09:55 AM
Field Original Value New Value
issue.field.bugzillaimportkey 35183 12342279
Henri Yandell made changes - 16/May/06 11:35 AM
Affects Version/s 1.0 Final [ 12311651 ]
Project Commons [ 12310458 ] Commons FileUpload [ 12310476 ]
Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
Component/s FileUpload [ 12311116 ]
Key COM-2127 FILEUPLOAD-39
Henri Yandell made changes - 16/May/06 12:13 PM
Affects Version/s 1.0 Final [ 12311697 ]
Henri Yandell made changes - 09/Mar/07 08:31 PM
Status Resolved [ 5 ] Closed [ 6 ]