diff options
| author | Gary Wilson Jr <gary.wilson@gmail.com> | 2007-09-27 16:57:55 +0000 |
|---|---|---|
| committer | Gary Wilson Jr <gary.wilson@gmail.com> | 2007-09-27 16:57:55 +0000 |
| commit | f4bb24658bfbcf9dcf9fdda08ddf0e611ee22f8d (patch) | |
| tree | 0af0cc898778ba24b867e60b19ad0ede950bb1db /django | |
| parent | e8c9e3a853954d7eae76243eeb8ab67fb8fdea40 (diff) | |
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
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/handlers/wsgi.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py index 6fe24f5d13..fdb5c0710a 100644 --- a/django/core/handlers/wsgi.py +++ b/django/core/handlers/wsgi.py @@ -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 '') 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): # Populates self._post and self._files |
