Fixed #5604 -- Check for use of HTTPS by looking at the `wsgi.url_scheme` environment variable instead of the `HTTPS` environment variable since `wsgi.url_scheme` is required by the WSGI spec, while `HTTPS` is not. Thanks, ramiro.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6428 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Gary Wilson Jr 2007-09-27 16:57:55 +00:00
parent e8c9e3a853
commit f4bb24658b
1 changed files with 2 additions and 1 deletions

View File

@ -105,7 +105,8 @@ class WSGIRequest(http.HttpRequest):
return '%s%s' % (self.path, self.environ.get('QUERY_STRING', '') and ('?' + self.environ.get('QUERY_STRING', '')) or '') return '%s%s' % (self.path, self.environ.get('QUERY_STRING', '') and ('?' + self.environ.get('QUERY_STRING', '')) or '')
def is_secure(self): def is_secure(self):
return 'HTTPS' in self.environ and self.environ['HTTPS'] == 'on' return 'wsgi.url_scheme' in self.environ \
and self.environ['wsgi.url_scheme'] == 'https'
def _load_post_and_files(self): def _load_post_and_files(self):
# Populates self._post and self._files # Populates self._post and self._files