Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #192 -- File uploads now work with built-in Web server. Thanks,…

… mordaha@gmail.com

git-svn-id: http://code.djangoproject.com/svn/django/trunk@476 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 77d20bedd408e95f1d96a166669f644e919a57cc 1 parent 7bb1a2b
@adrianholovaty adrianholovaty authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  django/core/handlers/wsgi.py
View
1  django/core/handlers/wsgi.py
@@ -29,6 +29,7 @@ def _load_post_and_files(self):
post_data = self.environ['wsgi.input'].read(int(self.environ["CONTENT_LENGTH"]))
if self.environ.get('CONTENT_TYPE', '').startswith('multipart'):
header_dict = dict([(k, v) for k, v in self.environ.items() if k.startswith('HTTP_')])
+ header_dict['Content-Type'] = self.environ.get('CONTENT_TYPE', '')
self._post, self._files = httpwrappers.parse_file_upload(header_dict, post_data)
else:
self._post, self._files = httpwrappers.QueryDict(post_data), datastructures.MultiValueDict()
Please sign in to comment.
Something went wrong with that request. Please try again.