﻿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
2742	[patch] core.handlers.wsgi.py doesn't properly handle blank CONTENT LENGTH with patch	anonymous	Adrian Holovaty	"I was getting some strange errors trying to do some AJAX-type stuff and kept getting a strange traceback. I traced it to the wsgi.py:122.

if CONTENT LENGTH = '', it fails with a Value Error.

Here is a patch:
replace line 122 with these:
            try:
                self._raw_post_data = self.environ['wsgi.input'].read(int(self.environ[""CONTENT_LENGTH""]))
            except ValueError:
                self._raw_post_data = self.environ['wsgi.input'].read(0)
            return self._raw_post_data
Corey Oordt"	defect	closed	Core (Other)	dev	major	duplicate			Unreviewed	1	0	0	0	0	0
