summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-08-10 21:20:45 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-08-10 21:20:45 +0000
commit77d20bedd408e95f1d96a166669f644e919a57cc (patch)
tree62031712e30898f218f6dab28ea5585934e15edf
parent7bb1a2bbbafe28a5e00f498e5418b584b7a7654a (diff)
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
-rw-r--r--django/core/handlers/wsgi.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py
index 9f0c035c53..e24921d19f 100644
--- a/django/core/handlers/wsgi.py
+++ b/django/core/handlers/wsgi.py
@@ -29,6 +29,7 @@ class WSGIRequest(httpwrappers.HttpRequest):
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()