#16201: MultiPartParser doesn't handle RFC2616 conform HTTP POST with Content- Length == 0 ----------------------------+------------------------------- Reporter: albsen | Owner: nobody Type: Bug | Status: new Milestone: | Component: HTTP handling Version: 1.3-rc1 | Severity: Normal Keywords: http multipart | Triage Stage: Unreviewed Has patch: 1 | Easy pickings: 0 UI/UX: 0 | ----------------------------+------------------------------- RFC 2616 says that: "Any Content-Length greater than or equal to zero is a valid value." http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
Currently {{{ MultiPartParser }}} doesn't handle "Content-Length: 0". The patch I've attached returns an empty request.POST in {{{ MultiPartParser.parser() }}} if the "Content-Length: 0" instead of raising an exception on {{{ MultiPartParser.__init__() }}}. I've also added the tests for this particular case in requests/tests. ( {{{ ./runtests.py --settings=test_sqlite requests.RequestsTests.test_POST_multipart_with_content_length_zero }}} ) -- Ticket URL: <https://code.djangoproject.com/ticket/16201> Django <https://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.