Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #3057 -- Changed WSGI handler not to expect CONTENT_LENGTH. Tha…

…nks for the patch, Ivan Sagalaev

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a2e227f2fa9e50f848a541040633acea0ab1c931 1 parent 23e21df
Adrian Holovaty authored November 23, 2006

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  django/core/handlers/wsgi.py
3  django/core/handlers/wsgi.py
@@ -157,7 +157,8 @@ def _get_raw_post_data(self):
157 157
             return self._raw_post_data
158 158
         except AttributeError:
159 159
             buf = StringIO()
160  
-            content_length = int(self.environ['CONTENT_LENGTH'])
  160
+            # CONTENT_LENGTH might be absent if POST doesn't have content at all (lighttpd)
  161
+            content_length = int(self.environ.get('CONTENT_LENGTH', ))
161 162
             safe_copyfileobj(self.environ['wsgi.input'], buf, size=content_length)
162 163
             self._raw_post_data = buf.getvalue()
163 164
             buf.close()

0 notes on commit a2e227f

Please sign in to comment.
Something went wrong with that request. Please try again.