Re: [Django] #7603: Add HttpRequest.scheme property

2013-10-15 Thread Django
#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 ):

 * 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: 
Django 
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.


Re: [Django] #7603: Add HttpRequest.scheme property

2013-10-15 Thread Django
#7603: Add HttpRequest.scheme property
-+-
 Reporter:  nslater  |Owner:
 Type:  New feature  |  unaizalakain
Component:  HTTP handling|   Status:  assigned
 Severity:  Normal   |  Version:  master
 Keywords:   |   Resolution:
Has patch:  1| Triage Stage:  Ready for
  Needs tests:  0|  checkin
Easy pickings:  0|  Needs documentation:  0
 |  Patch needs improvement:  0
 |UI/UX:  0
-+-

Comment (by unaizalakain):

 In fact, scheme is gotten from `wsgi.url_scheme` WSGI variable.
 [[http://wsgi.readthedocs.org/en/latest/definitions.html?highlight=url_scheme
 #envvar-wsgi.url_scheme|The docs]] state that:

 `wsgi.url_scheme`: A string representing the "scheme" portion of the
 URL at which the application is being invoked. Normally, this will have
 the value "http" or "https", as appropriate.

 It's true that this will always be `http` or `https` but there's no
 guarantee about it.

-- 
Ticket URL: 
Django 
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.15fa200e940a0133c4a9255a5d0f6341%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #7603: Add HttpRequest.scheme property

2013-10-14 Thread Django
#7603: Add HttpRequest.scheme property
-+-
 Reporter:  nslater  |Owner:
 Type:  New feature  |  unaizalakain
Component:  HTTP handling|   Status:  assigned
 Severity:  Normal   |  Version:  master
 Keywords:   |   Resolution:
Has patch:  1| Triage Stage:  Ready for
  Needs tests:  0|  checkin
Easy pickings:  0|  Needs documentation:  0
 |  Patch needs improvement:  0
 |UI/UX:  0
-+-

Comment (by aaugustin):

 LGTM.

 Why do the docs say "normally" and "usually"? The current implementation
 is always going to return 'http' or 'https'. Let's avoid vague terms.

-- 
Ticket URL: 
Django 
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.bb698e43ba76ef907c2fdcae7a57a19f%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #7603: Add HttpRequest.scheme property

2013-10-14 Thread Django
#7603: Add HttpRequest.scheme property
-+-
 Reporter:  nslater  |Owner:
 Type:  New feature  |  unaizalakain
Component:  HTTP handling|   Status:  assigned
 Severity:  Normal   |  Version:  master
 Keywords:   |   Resolution:
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 timo):

 * needs_better_patch:  1 => 0
 * stage:  Accepted => Ready for checkin


Comment:

 This looks good to me, but since it's potentially security related I'd
 like one more +1 before committing.

-- 
Ticket URL: 
Django 
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.8520600cfd1fda2c31499a79bc0427f3%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #7603: Add HttpRequest.scheme property

2013-10-14 Thread Django
#7603: Add HttpRequest.scheme property
---+
 Reporter:  nslater|Owner:  unaizalakain
 Type:  New feature|   Status:  assigned
Component:  HTTP handling  |  Version:  master
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+
Changes (by unaizalakain):

 * owner:  nslater => unaizalakain


-- 
Ticket URL: 
Django 
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.dca374ccafae702828777503177b7f04%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #7603: Add HttpRequest.scheme property (was: Add HttpRequest.get_scheme())

2013-10-13 Thread Django
#7603: Add HttpRequest.scheme property
---+
 Reporter:  nslater|Owner:  nslater
 Type:  New feature|   Status:  assigned
Component:  HTTP handling  |  Version:  master
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

-- 
Ticket URL: 
Django 
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.15335d4051ba2ae3afa339c35dd80ada%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.