Re: [Django] #24137: Reason phrases use all upper case by default; standard suggests title case

2015-01-28 Thread Django
#24137: Reason phrases use all upper case by default; standard suggests title 
case
-+-
 Reporter:  jdufresne|Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  HTTP handling|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"24b2bc635e23e4235f51095fbe099beec27a65c8"]:
 {{{
 #!CommitTicketReference repository=""
 revision="24b2bc635e23e4235f51095fbe099beec27a65c8"
 Fixed #24137 -- Switched to HTTP reason phrases from Python stdlib.
 }}}

--
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/067.bf91a0886c67ab6d6a3a8b7fc01a8c87%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24137: Reason phrases use all upper case by default; standard suggests title case

2015-01-27 Thread Django
#24137: Reason phrases use all upper case by default; standard suggests title 
case
-+-
 Reporter:  jdufresne|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  HTTP handling|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by collinanderson):

 * cc: cmawebsite@… (added)
 * stage:  Accepted => Ready for checkin


--
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/067.13418fff5eb975112ae40540fb0c31b4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24137: Reason phrases use all upper case by default; standard suggests title case

2015-01-24 Thread Django
#24137: Reason phrases use all upper case by default; standard suggests title 
case
--+
 Reporter:  jdufresne |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  HTTP handling |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by jdufresne):

 * needs_better_patch:  1 => 0


Comment:

 I have updated the PR by incorporating feedback from reviews.

--
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/067.6afb1a45fa0329e9576d2bccce42e5d9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24137: Reason phrases use all upper case by default; standard suggests title case

2015-01-13 Thread Django
#24137: Reason phrases use all upper case by default; standard suggests title 
case
--+
 Reporter:  jdufresne |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
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
--+

Comment (by aaugustin):

 While there are still some details to figure out, I think the PR is on the
 right track.

--
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/067.1f524dd92209737214901bb6b5ac71e8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24137: Reason phrases use all upper case by default; standard suggests title case

2015-01-13 Thread Django
#24137: Reason phrases use all upper case by default; standard suggests title 
case
--+
 Reporter:  jdufresne |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
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
--+

Comment (by jdufresne):

 Replying to [comment:3 aaugustin]:
 > What problems does uppercase cause in practice?

 I can share my motivation.

 I was analyzing request/responses in Firefox and noticed that Django's
 requests always looked different than Apache static file requests and PHP
 requests. The main difference, of course, was that Django returned all
 upper case for reason phrases. I investigated if one was more correct than
 the other. The HTTP standard ''recommends'' using title case, but it is
 true that it is merely a recommendation. As stated in the standard, the
 reason phrase is for humans only. My thinking:

 * Title case is easier to read for most English reading humans (probably
 why it is recommend)
 * Django has no good reason to use a non-recommended reason phrase (there
 is no benefit)
 * Use Python stdlib code to reduce duplication and maintenance
 * Why go out of the way to make Django responses appear different?

 Having thought about this some more, I think there is a ''very slight''
 (I'd like to emphasize very slight) security implication here. If Django
 always looks different, a malicious user could use this difference to know
 when a request is served by Django instead of some other application
 server. If there is a known exploit -- perhaps recently made public by a
 release -- this information could allow the malicious user to find Django
 servers and use that known exploit.

 Now, I'm not saying there aren't other Django identifying factors, I'm
 sure there are. But this is one step in that direction.

 > I'm not in favor of adding the complexity of a str subclass if we don't
 have a compelling reason.

 Personally, I agree. I don't see the benefit of adding a `str` subclass.
 Generally, machines should be using the status code and not the reason
 phrase (which can be altered). The status code has very specific meaning
 while the reason phrase is intended for humans only.

 At this point I have not investigated adding a `str` subclass in the PR.
 Unless there is a strong suggestion to do it in order to finish the PR, I
 will not.

--
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/067.49da0c0006a6f34966cdf5acbbf047b3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24137: Reason phrases use all upper case by default; standard suggests title case

2015-01-13 Thread Django
#24137: Reason phrases use all upper case by default; standard suggests title 
case
--+
 Reporter:  jdufresne |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
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
--+

Comment (by aaugustin):

 Browsers ignore the phrase and only look at the code. Our
 
[https://docs.djangoproject.com/en/1.7/topics/testing/tools/#django.test.SimpleTestCase.assertContains
 testing tools] encourage testing the status code.

 That's why I don't think many people test the phrases and I'm not too
 worried about making a backwards-incompatible change in this area.

--
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/067.eaedb35a5dd3f901f20b520a4df8cb58%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24137: Reason phrases use all upper case by default; standard suggests title case

2015-01-13 Thread Django
#24137: Reason phrases use all upper case by default; standard suggests title 
case
--+
 Reporter:  jdufresne |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
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 claudep):

 * needs_better_patch:  0 => 1


Comment:

 I've made some comments on the PR.

--
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/067.97fab38bd3bc8767c89c7b12a8f26f54%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24137: Reason phrases use all upper case by default; standard suggests title case

2015-01-12 Thread Django
#24137: Reason phrases use all upper case by default; standard suggests title 
case
--+
 Reporter:  jdufresne |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  HTTP handling |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by claudep):

 Aymeric, my only concern is that all tests comparing reason phrases will
 suddenly fail after upgrading. But if you think this is an acceptable
 backwards incompatibility if documented, then fine for me.

--
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/067.7a4067d21f6f5f64ffd3201f88770a5d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24137: Reason phrases use all upper case by default; standard suggests title case

2015-01-12 Thread Django
#24137: Reason phrases use all upper case by default; standard suggests title 
case
--+
 Reporter:  jdufresne |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  HTTP handling |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by aaugustin):

 The patch looks good. Reusing the stdlib's list makes sense. I prefer
 documenting the change than adding complexity.

--
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/067.6bd3fb27a9eb79a7bacd0d763b38f86c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24137: Reason phrases use all upper case by default; standard suggests title case

2015-01-12 Thread Django
#24137: Reason phrases use all upper case by default; standard suggests title 
case
--+
 Reporter:  jdufresne |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  HTTP handling |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by aaugustin):

 What problems does uppercase cause in practice?

 I'm not in favor of adding the complexity of a str subclass if we don't
 have a compelling reason.

--
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/067.819dec2ee42bbecce838823991a8456f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24137: Reason phrases use all upper case by default; standard suggests title case

2015-01-12 Thread Django
#24137: Reason phrases use all upper case by default; standard suggests title 
case
--+
 Reporter:  jdufresne |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  HTTP handling |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by jdufresne):

 * cc: jon.dufresne@… (added)
 * has_patch:  0 => 1


Comment:

 https://github.com/django/django/pull/3902

 > Maybe a string subclass which could compare case-insensitively?

 I can certainly look into adding this.

--
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/067.661aae6ff960036866f0ef92b7b2ec86%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24137: Reason phrases use all upper case by default; standard suggests title case

2015-01-12 Thread Django
#24137: Reason phrases use all upper case by default; standard suggests title 
case
--+
 Reporter:  jdufresne |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  HTTP handling |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by claudep):

 * needs_better_patch:   => 0
 * needs_docs:   => 0
 * needs_tests:   => 0
 * stage:  Unreviewed => Accepted


Comment:

 Upper case for this phrases were introduced long ago, see
 6e034a831aea204b39f4863eddfbc223a638fb76 (from 2005). The only concern is
 backwards compatibility, of course. Maybe a string subclass which could
 compare case-insensitively?

--
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/067.f45c041ea9d9b61a4381d33a89f03873%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #24137: Reason phrases use all upper case by default; standard suggests title case

2015-01-12 Thread Django
#24137: Reason phrases use all upper case by default; standard suggests title 
case
--+
 Reporter:  jdufresne |  Owner:  nobody
 Type:  Cleanup/optimization  | Status:  new
Component:  HTTP handling |Version:  master
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 Reason phrases were added in ticket #12747. The phrases were added as all
 upper case.

 When looking at the HTTP standard as reported by different sources. The
 default phrases are never all upper case. Instead they typically use a
 title case where the first letter of each word is capitalized and the
 remaining words are lower case. I found it odd and unusual that Django
 would follow a different default here.

 Pull request to follow.

 See documentation at:

 * https://www.ietf.org/rfc/rfc2616.txt
 * http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
 * http://www.iana.org/assignments/http-status-codes (referenced in Django
 code)

--
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/052.4e51201cb241455f072a448441f348b7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.