Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1311 from loic/ticket20619_take2

Fixed missing initializations in WSGIRequest. Refs #20619
  • Loading branch information...
commit b21e96d00d12f8467d61b15a943994b303504e0e 2 parents 8db264c + 48ce167
@andrewgodwin andrewgodwin authored
Showing with 5 additions and 0 deletions.
  1. +1 −0  django/core/handlers/wsgi.py
  2. +4 −0 django/http/request.py
View
1  django/core/handlers/wsgi.py
@@ -103,6 +103,7 @@ def __init__(self, environ):
content_length = 0
self._stream = LimitedStream(self.environ['wsgi.input'], content_length)
self._read_started = False
+ self.resolver_match = None
def _is_secure(self):
return 'wsgi.url_scheme' in self.environ and self.environ['wsgi.url_scheme'] == 'https'
View
4 django/http/request.py
@@ -39,6 +39,10 @@ class HttpRequest(object):
_upload_handlers = []
def __init__(self):
+ # WARNING: The `WSGIRequest` subclass doesn't call `super`.
+ # Any variable assignment made here should also happen in
+ # `WSGIRequest.__init__()`.
+
self.GET, self.POST, self.COOKIES, self.META, self.FILES = {}, {}, {}, {}, {}
self.path = ''
self.path_info = ''
Please sign in to comment.
Something went wrong with that request. Please try again.