#399 closed defect (fixed)

upload a too-large mutable file fails badly

Reported by: zooko Owned by: warner
Priority: major Milestone: 1.1.0
Component: code-encoding Version: 1.0.0
Keywords: Cc:
Launchpad Bug:

Description

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: 
	

}}}

Change History (5)

comment:1 Changed at 2008-05-09T18:33:44Z by zooko

  • Milestone changed from undecided to 1.1.0

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. ;-)

comment:2 Changed at 2008-05-29T22:36:35Z by warner

  • Owner set to warner
  • Status changed from new to assigned

comment:3 Changed at 2008-05-29T23:08:33Z by warner

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

comment:4 Changed at 2008-06-03T06:10:08Z by warner

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

comment:5 Changed at 2008-06-03T07:09:35Z by warner

  • Resolution set to fixed
  • Status changed from assigned to closed

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

Note: See TracTickets for help on using tickets.