Issue Details (XML | Word | Printable)

Key: FILEUPLOAD-93
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Jochen Wiedmann
Reporter: Loïc Péron
Votes: 2
Watchers: 0
Operations

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

[fileupload] Allow parsing requests of unknown length

Created: 08/Nov/05 06:28 PM   Updated: 09/Mar/07 08:32 PM
Return to search
Component/s: None
Affects Version/s: 1.0 Final
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File commons-fileupload-1.0-bug-37395.patch 2006-01-06 11:25 PM Loïc Péron 0.8 kB
Text File commons-fileupload-1.1-bug-37395.patch 2006-01-06 11:26 PM Loïc Péron 0.8 kB
Text File Licensed for inclusion in ASF works commons-fileupload-2.patch 2006-05-22 07:51 PM Jochen Wiedmann 5 kB
Environment:
Operating System: other
Platform: Other

Bugzilla Id: 37395
Resolution Date: 04/Aug/06 09:25 PM


 Description  « Hide
FileUpload refuses parsing requests of unknown length.
It does not allow chunking the post in case of unknown length.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Sharmarke Aden added a comment - 06/Jan/06 10:11 AM
RFC1867 recommends sending content-length attribute for the overall transmission
but it isn't required (Section 5.2 of RFC1867). I'm attempting to zip and send a
collection of files on the fly and I'm running into "Stream ended unexpectedly"
exception. I am dealing with large files and of course I can't predetermine the
length of the resulting zip file.

Loïc Péron added a comment - 06/Jan/06 11:25 PM
Created an attachment (id=17350)
Simple workaround for FileUpload 1.0

Added a simple workaround for FileUpload 1.0.


Loïc Péron added a comment - 06/Jan/06 11:26 PM
Created an attachment (id=17351)
Simple workaround for FileUpload 1.1

Added a simple workaround for FileUpload 1.0.


Loïc Péron added a comment - 06/Jan/06 11:32 PM
Handling of unknown length requests as demonstrated in the patch works but does
not apply maxSize, as request size is -1.
For maxSize to be applied, request size needs to be computed on the fly, and
maxSize check should be checked during parsing too.
This can necessitate further handling of FileItem created to the point where
maxSize is attained.

I currently cannot dedicate time to this point, but I may need to resolve this
in a not so near future, if it has not been solved already.


Martin Cooper added a comment - 01/Apr/06 01:07 PM
      • COM-2849 has been marked as a duplicate of this bug. ***

Jochen Wiedmann added a comment - 22/May/06 07:51 PM
Here's a more enhanced version of the patch, which allows the absence of a content-length, but keeps the check on-the-fly.


Jochen Wiedmann added a comment - 04/Aug/06 09:25 PM
Fixed.