Author: gwilson
Date: 2007-09-27 11:57:55 -0500 (Thu, 27 Sep 2007)
New Revision: 6428

Modified:
   django/trunk/django/core/handlers/wsgi.py
Log:
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.


Modified: django/trunk/django/core/handlers/wsgi.py
===================================================================
--- django/trunk/django/core/handlers/wsgi.py   2007-09-27 16:42:20 UTC (rev 
6427)
+++ django/trunk/django/core/handlers/wsgi.py   2007-09-27 16:57:55 UTC (rev 
6428)
@@ -105,7 +105,8 @@
         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


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to