Code

Ticket #1641: wsgi_handler_fix_r2714.diff

File wsgi_handler_fix_r2714.diff, 678 bytes (added by django@…, 8 years ago)

patch makes WSGI handler cope with absent QUERY_STRING

Line 
1=== wsgi.py
2==================================================================
3--- wsgi.py     (/mirror/django/branches/magic-removal/django/core/handlers/wsgi.py)    (revision 2900)
4+++ wsgi.py     (/local/django/branches/magic-removal/django/core/handlers/wsgi.py)     (local)
5@@ -63,7 +63,7 @@
6             pformat(self.META))
7 
8     def get_full_path(self):
9-        return '%s%s' % (self.path, self.environ['QUERY_STRING'] and ('?' + self.environ['QUERY_STRING']) or '')
10+        return '%s%s' % (self.path, self.environ.get('QUERY_STRING', '') and ('?' + self.environ.get('QUERY_STRING', '')) or '')
11 
12     def _load_post_and_files(self):
13         # Populates self._post and self._files