#10687: request parsing breaks if upload_handlers is empty
----------------------------------+-----------------------------------------
 Reporter:  rfk                   |       Owner:  nobody    
   Status:  new                   |   Milestone:            
Component:  File uploads/storage  |     Version:  SVN       
 Keywords:                        |       Stage:  Unreviewed
Has_patch:  1                     |  
----------------------------------+-----------------------------------------
 If request.upload_handlers is empty, attempts to use MultiPartParser will
 fail with "TypeError: 'long' object is not iterable".  This is caused by
 the use of min() to calculate the parser chunk size; if upload_handlers is
 empty then min() is called with a single argument, which it tries to
 interpret as an iterable.

 The attached patch avoids this error and does what I think is the most
 sensible thing - any file uploads get discarded, but other POST variables
 are parsed correctly.  If this is not desired, perhaps its worth checking
 for an empty upload_handlers and providing a better error message?

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10687>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to