upload a too-large mutable file fails badly #399

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

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: ``` }}}
zooko added the
code-encoding
major
defect
1.0.0
labels 2008-04-29 16:06:32 +00:00
zooko added this to the undecided milestone 2008-04-29 16:06:32 +00:00
Author

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. ;-)
zooko modified the milestone from undecided to 1.1.0 2008-05-09 18:33:44 +00:00
warner self-assigned this 2008-05-29 22:36:35 +00:00

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?)

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.

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.
warner added the
fixed
label 2008-06-03 07:09:35 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

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