diff -ru Django-1.0/django/core/handlers/modpython.py Django-1.0-patched/django/core/handlers/modpython.py
old
|
new
|
|
1 | 1 | import os |
2 | 2 | from pprint import pformat |
| 3 | import StringIO |
3 | 4 | |
4 | 5 | from django import http |
5 | 6 | from django.core import signals |
… |
… |
|
76 | 77 | def _load_post_and_files(self): |
77 | 78 | "Populates self._post and self._files" |
78 | 79 | if 'content-type' in self._req.headers_in and self._req.headers_in['content-type'].startswith('multipart'): |
79 | | self._raw_post_data = '' |
| 80 | if hasattr(self, '_raw_post_data'): |
| 81 | rq = StringIO.StringIO(self._raw_post_data) |
| 82 | else: |
| 83 | self._raw_post_data = '' |
| 84 | rq = self._req |
80 | 85 | try: |
81 | | self._post, self._files = self.parse_file_upload(self.META, self._req) |
| 86 | self._post, self._files = self.parse_file_upload(self.META, rq) |
82 | 87 | except: |
83 | 88 | # See django.core.handlers.wsgi.WSGIHandler for an explanation |
84 | 89 | # of what's going on here. |