upload a too-large mutable file fails badly #399

Closed
opened 2008-04-29 16:06:32 +00:00 by zooko · 4 comments
zooko commented 2008-04-29 16:06:32 +00:00
Owner

Jake Edge tried to upload a 100 MB mutable file and got:

	  File "/home/jake/allmydata-tahoe-1.0.0-r2509/src/allmydata/mutable/publish.py", line 256, in setup_encoding_parameters
	    assert self.num_segments in [0, 1,] # SDMF restrictions
	exceptions.AssertionError: 

followed by:

	  File "/home/jake/allmydata-tahoe-1.0.0-r2509/support/lib/python2.5/site-packages/Nevow-0.9.18-py2.5.egg/nevow/flat/ten.py", line 61, in partialflatten
	    return flattener(obj, context)
	  File "/home/jake/allmydata-tahoe-1.0.0-r2509/support/lib/python2.5/site-packages/Nevow-0.9.18-py2.5.egg/nevow/flat/flatstan.py", line 167, in StringSerializer
	    return original.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
	exceptions.MemoryError: 
	

}}}

Jake Edge tried to upload a 100 MB mutable file and got: ``` File "/home/jake/allmydata-tahoe-1.0.0-r2509/src/allmydata/mutable/publish.py", line 256, in setup_encoding_parameters assert self.num_segments in [0, 1,] # SDMF restrictions exceptions.AssertionError: ``` followed by: ``` File "/home/jake/allmydata-tahoe-1.0.0-r2509/support/lib/python2.5/site-packages/Nevow-0.9.18-py2.5.egg/nevow/flat/ten.py", line 61, in partialflatten return flattener(obj, context) File "/home/jake/allmydata-tahoe-1.0.0-r2509/support/lib/python2.5/site-packages/Nevow-0.9.18-py2.5.egg/nevow/flat/flatstan.py", line 167, in StringSerializer return original.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;") exceptions.MemoryError: ``` }}}
tahoe-lafs added the
code-encoding
major
defect
1.0.0
labels 2008-04-29 16:06:32 +00:00
tahoe-lafs added this to the undecided milestone 2008-04-29 16:06:32 +00:00
zooko commented 2008-05-09 18:33:44 +00:00
Author
Owner

I think this ticket has a high ratio of value to difficulty so I'm going to put it in Milestone 1.1.0 for the moment and see if someone fixes it. ;-)

I think this ticket has a high ratio of value to difficulty so I'm going to put it in Milestone 1.1.0 for the moment and see if someone fixes it. ;-)
tahoe-lafs modified the milestone from undecided to 1.1.0 2008-05-09 18:33:44 +00:00
warner commented 2008-05-29 23:08:33 +00:00
Author
Owner

To improve this, I'm going to create a FileTooLargeForSDMFError, raise it instead of that assertion, and make the web server catch it during PUT and POST and convert it into a more useful HTTP error (perhaps BAD_REQUEST or NOT_PERMITTED?)

To improve this, I'm going to create a `FileTooLargeForSDMFError`, raise it instead of that assertion, and make the web server catch it during PUT and POST and convert it into a more useful HTTP error (perhaps BAD_REQUEST or NOT_PERMITTED?)
warner commented 2008-06-03 06:10:08 +00:00
Author
Owner

There is a new FileTooLargeError in storage.py.. let's move it out to interfaces.py and use it from both places.

There is a new FileTooLargeError in storage.py.. let's move it out to interfaces.py and use it from both places.
warner commented 2008-06-03 07:09:35 +00:00
Author
Owner

Done, in changeset:5289064dcf05f4df, changeset:f4496bd5533b92ee, and changeset:32c89a8d594673a9. The error response is now 413 REQUEST ENTITY TOO LARGE.

Done, in changeset:5289064dcf05f4df, changeset:f4496bd5533b92ee, and changeset:32c89a8d594673a9. The error response is now 413 REQUEST ENTITY TOO LARGE.
tahoe-lafs added the
fixed
label 2008-06-03 07:09:35 +00:00
warner closed this issue 2008-06-03 07:09:35 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac-2024-07-25#399
No description provided.