diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-09-17 09:02:25 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-09-17 09:02:25 +0000 |
| commit | 36f8b8d6875cf6e5290afa736a8750e0e8c65129 (patch) | |
| tree | 6b8b6a1505d8364628aba7bb194b741e1e3f0a8b /django/core/handlers/modpython.py | |
| parent | 0aff292bcfacf23d5721dec6dcce9e64889740cb (diff) | |
Fixed #9014 -- Check that we really are processing a POST before processing
POST data. Some nice debugging form aaron to track this down.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9064 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/handlers/modpython.py')
| -rw-r--r-- | django/core/handlers/modpython.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/django/core/handlers/modpython.py b/django/core/handlers/modpython.py index 8a5dba99a5..d1fdf5259d 100644 --- a/django/core/handlers/modpython.py +++ b/django/core/handlers/modpython.py @@ -75,6 +75,10 @@ class ModPythonRequest(http.HttpRequest): def _load_post_and_files(self): "Populates self._post and self._files" + if self.method != 'POST': + self._post, self._files = http.QueryDict('', encoding=self._encoding), datastructures.MultiValueDict() + return + if 'content-type' in self._req.headers_in and self._req.headers_in['content-type'].startswith('multipart'): self._raw_post_data = '' try: |
