#7603: Add HttpRequest.scheme property -------------------------------------+------------------------------------- Reporter: nslater | Owner: Type: New feature | unaizalakain Component: HTTP handling | Status: closed Severity: Normal | Version: master Keywords: | Resolution: fixed Has patch: 1 | Triage Stage: Ready for Needs tests: 0 | checkin Easy pickings: 0 | Needs documentation: 0 | Patch needs improvement: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Tim Graham <timograham@…>):
* status: assigned => closed * resolution: => fixed Comment: In [changeset:"c7634cd7fe7dc09338fcec0ca48d816a29d791b0"]: {{{ #!CommitTicketReference repository="" revision="c7634cd7fe7dc09338fcec0ca48d816a29d791b0" 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. }}} -- Ticket URL: <https://code.djangoproject.com/ticket/7603#comment:18> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.780f4602e42323495452c90b71354df1%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.