Ticket #3057: 3057.2.diff
File 3057.2.diff, 903 bytes (added by , 18 years ago) |
---|
-
django/core/handlers/wsgi.py
157 157 return self._raw_post_data 158 158 except AttributeError: 159 159 buf = StringIO() 160 # CONTENT_LENGTH might be absent if POST doesn't have content at all (lighttpd) 161 content_length = int(self.environ.get('CONTENT_LENGTH', 0)) 160 try: 161 # CONTENT_LENGTH might be absent if POST doesn't have content at all (lighttpd) 162 content_length = int(self.environ.get('CONTENT_LENGTH', 0)) 163 except ValueError: 164 content_length = 0 162 165 safe_copyfileobj(self.environ['wsgi.input'], buf, size=content_length) 163 166 self._raw_post_data = buf.getvalue() 164 167 buf.close()