﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
12411	MultiPartParserError: Invalid content length: 0	alextreme	nobody	"Hi all,

Over the last few months I've been bumping in to seemingly-random MultiPartParserError's like the ones attached. 

The project involved is for a client who likely are behind a proxy server that somehow mangles the POST requests to the django admin. The app itself isn't very exciting, the admin is used in-place and the model involved simply allows the user to upload files. 

The environment is a Debian Lenny server with Django 1.1. I've tried various mod-wsgi and mod-python setups, I've attached a traceback for both. 

I'll dive deeper into the bug over the next few days (and get some more details on the proxy used), but if anyone has any ideas I'd love to hear them. 

A snippet from the traceback:
{{{
  File ""/usr/lib/python2.5/site-packages/django/core/handlers/modpython.py"", line 87, in _load_post_and_files
    self._post, self._files = self.parse_file_upload(self.META, self._req)

  File ""/usr/lib/python2.5/site-packages/django/http/__init__.py"", line 123, in parse_file_upload
    parser = MultiPartParser(META, post_data, self.upload_handlers, self.encoding)

  File ""/usr/lib/python2.5/site-packages/django/http/multipartparser.py"", line 80, in __init__
    raise MultiPartParserError(""Invalid content length: %r"" % content_length)

MultiPartParserError: Invalid content length: 0


<ModPythonRequest
path:/admin/<appname>/<modelname>/add/,
GET:<QueryDict: {}>,
POST:<could not parse>,
COOKIES:{'sessionid': 'e295f588b05ccf8d6ae7c6b05c8d9ac1'},
}}}"		closed	Core (Other)	1.1		invalid	multipartparsererror		Unreviewed	0	0	0	0	0	0
