#17259: error in http post data parser -------------------------------+-------------------------------------- Reporter: bayazee@… | Owner: nobody Type: Bug | Status: closed Component: HTTP handling | Version: Severity: Normal | Resolution: needsinfo Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+--------------------------------------
Old description: > Traceback (most recent call last): > > File "/usr/local/lib/python2.6/site- > packages/django/core/handlers/base.py", line 95, in get_response > response = middleware_method(request, callback, callback_args, > callback_kwargs) > > File "/usr/local/lib/python2.6/site- > packages/django/middleware/csrf.py", line 164, in process_view > request_csrf_token = request.POST.get('csrfmiddlewaretoken', "") > > File "/usr/local/lib/python2.6/site- > packages/django/core/handlers/wsgi.py", line 171, in _get_post > self._load_post_and_files() > > File "/usr/local/lib/python2.6/site- > packages/django/core/handlers/wsgi.py", line 137, in _load_post_and_files > self._post, self._files = self.parse_file_upload(self.META, > self.environ['wsgi.input']) > > File "/usr/local/lib/python2.6/site-packages/django/http/__init__.py", > line 123, in parse_file_upload > parser = MultiPartParser(META, post_data, self.upload_handlers, > self.encoding) > > File "/usr/local/lib/python2.6/site- > packages/django/http/multipartparser.py", line 80, in __init__ > raise MultiPartParserError("Invalid content length: %r" % > content_length) > > MultiPartParserError: Invalid content length: 0 New description: {{{ Traceback (most recent call last): File "/usr/local/lib/python2.6/site- packages/django/core/handlers/base.py", line 95, in get_response response = middleware_method(request, callback, callback_args, callback_kwargs) File "/usr/local/lib/python2.6/site-packages/django/middleware/csrf.py", line 164, in process_view request_csrf_token = request.POST.get('csrfmiddlewaretoken', "") File "/usr/local/lib/python2.6/site- packages/django/core/handlers/wsgi.py", line 171, in _get_post self._load_post_and_files() File "/usr/local/lib/python2.6/site- packages/django/core/handlers/wsgi.py", line 137, in _load_post_and_files self._post, self._files = self.parse_file_upload(self.META, self.environ['wsgi.input']) File "/usr/local/lib/python2.6/site-packages/django/http/__init__.py", line 123, in parse_file_upload parser = MultiPartParser(META, post_data, self.upload_handlers, self.encoding) File "/usr/local/lib/python2.6/site- packages/django/http/multipartparser.py", line 80, in __init__ raise MultiPartParserError("Invalid content length: %r" % content_length) MultiPartParserError: Invalid content length: 0 }}} -- Comment (by kmtracey): Also if you search trac (https://code.djangoproject.com/search?q=MultiPartParserError+%22Invalid+content+length%22&noquickjump=1&ticket=on) you will find at least one similar report that may help you in isolating the cause of this problem. When it has been reported before the cause was found to be outside of Django itself. -- Ticket URL: <https://code.djangoproject.com/ticket/17259#comment:2> 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.