Ticket #5611: modpython.diff
File modpython.diff, 1.6 KB (added by , 16 years ago) |
---|
-
django/core/handlers/modpython.py
76 76 return self._req.subprocess_env.get('HTTPS', '').lower() in ('on', '1') 77 77 78 78 def _load_post_and_files(self): 79 "Populates self._post and self._files "79 "Populates self._post and self._files if the content-type is a form type" 80 80 if self.method != 'POST': 81 81 self._post, self._files = http.QueryDict('', encoding=self._encoding), datastructures.MultiValueDict() 82 82 return 83 83 84 if 'content-type' in self._req.headers_in and self._req.headers_in['content-type'].startswith('multipart'):84 if self._req.headers_in.get('content-type','').startswith('multipart/form-data'): 85 85 self._raw_post_data = '' 86 86 try: 87 87 self._post, self._files = self.parse_file_upload(self.META, self._req) … … 92 92 self._files = datastructures.MultiValueDict() 93 93 self._post_parse_error = True 94 94 raise 95 elif self._req.headers_in.get('content-type','').startswith('application/x-www-form-urlencoded'): 96 self._post, self._files = http.QueryDict(self.raw_post_data, encoding=self._encoding), datastructures.MultiValueDict() 95 97 else: 96 self._post, self._files = http.QueryDict( self.raw_post_data, encoding=self._encoding), datastructures.MultiValueDict()98 self._post, self._files = http.QueryDict(''), datastructures.MultiValueDict() 97 99 98 100 def _get_request(self): 99 101 if not hasattr(self, '_request'):