Ticket #5682: patch_django_5682_wsgi.diff
File patch_django_5682_wsgi.diff, 2.1 KB (added by , 17 years ago) |
---|
-
django_src/django/core/handlers/wsgi.py
91 91 except: 92 92 post = '<could not parse>' 93 93 try: 94 put = pformat(self.PUT) 95 except: 96 put = '<could not parse>' 97 try: 94 98 cookies = pformat(self.COOKIES) 95 99 except: 96 100 cookies = '<could not parse>' … … 98 102 meta = pformat(self.META) 99 103 except: 100 104 meta = '<could not parse>' 101 return '<WSGIRequest\nGET:%s,\nPOST:%s,\n COOKIES:%s,\nMETA:%s>' % \102 (get, post, cookies, meta)105 return '<WSGIRequest\nGET:%s,\nPOST:%s,\nPUT:%s,\nCOOKIES:%s,\nMETA:%s>' % \ 106 (get, post, put, cookies, meta) 103 107 104 108 def get_full_path(self): 105 109 return '%s%s' % (self.path, self.environ.get('QUERY_STRING', '') and ('?' + self.environ.get('QUERY_STRING', '')) or '') … … 122 126 123 127 def _get_request(self): 124 128 if not hasattr(self, '_request'): 125 self._request = datastructures.MergeDict(self.POST, self. GET)129 self._request = datastructures.MergeDict(self.POST, self.PUT, self.GET) 126 130 return self._request 127 131 128 132 def _get_get(self): … … 142 146 def _set_post(self, post): 143 147 self._post = post 144 148 149 def _get_put(self): 150 if not hasattr(self, '_put'): 151 self._load_post_and_files() 152 self._put = self._post 153 return self._put 154 155 def _set_put(self, put): 156 self._put = put 157 145 158 def _get_cookies(self): 146 159 if not hasattr(self, '_cookies'): 147 160 self._cookies = http.parse_cookie(self.environ.get('HTTP_COOKIE', '')) … … 172 185 173 186 GET = property(_get_get, _set_get) 174 187 POST = property(_get_post, _set_post) 188 PUT = property(_get_put, _set_put) 175 189 COOKIES = property(_get_cookies, _set_cookies) 176 190 FILES = property(_get_files) 177 191 REQUEST = property(_get_request)