django/django/http
Unai Zalakain c7634cd7fe Fixed #7603 -- Added a 'scheme' property to the HttpRequest object
`HttpRequest.scheme` is `https` if `settings.SECURE_PROXY_SSL_HEADER` is
appropriately set and falls back to `HttpRequest._get_scheme()` (a hook
for subclasses to implement) otherwise.

`WSGIRequest._get_scheme()` makes use of the `wsgi.url_scheme` WSGI
environ variable to determine the request scheme.

`HttpRequest.is_secure()` simply checks if `HttpRequest.scheme` is
`https`.

This provides a way to check the current scheme in templates, for example.
It also allows us to deal with other schemes.

Thanks nslater for the suggestion.
2013-10-15 09:04:12 -04:00
..
__init__.py Fixed #16822 -- Added RawPostDataException 2013-10-08 08:05:39 -04:00
cookie.py Fixed #18403 -- Initialized bad_cookies in SimpleCookie 2013-09-10 08:26:54 -04:00
multipartparser.py Fixed #21189: Cleaned up usage of bare except clauses. 2013-10-05 11:50:03 +02:00
request.py Fixed #7603 -- Added a 'scheme' property to the HttpRequest object 2013-10-15 09:04:12 -04:00
response.py Fixed #20889 -- Prevented email.Header from inserting newlines 2013-09-09 08:47:41 -04:00
utils.py Fixed #20472: response.content should be bytes on both Python 2 and 3 2013-05-21 01:28:16 +02:00