#4119: Incorrect HTTP-Date format in expire field of HTTP Header
--------------------------------+-------------------------------------------
   Reporter:  Ciantic           |                Owner:  adrian      
     Status:  new               |            Component:  Contrib apps
    Version:  SVN               |           Resolution:              
   Keywords:  http-date header  |                Stage:  Accepted    
  Has_patch:  1                 |           Needs_docs:  0           
Needs_tests:  0                 |   Needs_better_patch:  0           
--------------------------------+-------------------------------------------
Changes (by Chris Bennett <[EMAIL PROTECTED]>):

  * needs_better_patch:  1 => 0

Comment:

 Attaching a patch that addresses the locale-dependency of strftime to
 address the requirement of HTTP/1.1 RFC2616 3.3.1:
 
 email.utils.formatdate() returns a correctly formatted fixed length date
 without consideration of current locale (which is the correct behavior)
 for consideration of the HTTP RFC standards. (I don't like the name of the
 module this method is coming from either.)
 
 Important notes about this patch:
  * I fixed a bug relating to the interpretation of the boolean True value
 in django/utils/cache.py (line 46) - it now reflects the behavior as
 described in the docstring above it. (So passing in max_age=1 does not
 result in the "Cache-Control" header being populated with simply "max-
 age")
  * The discussion in this ticket is confusing. The summary refers to
 "expire field of HTTP header" where the previously submitted patches
 attempt to fix _cookies_. This patch resolves that issue, in addition to
 fixing incorrect _HTTP response headers_ that should contain an HTTP 3.3.1
 formatted date.
  * The  '+ "GMT"' tackyness is to insure support with Python 2.3, whose
 formatdate() method does not yet have the usegmt enhancement.
 
 Hope this helps, Chris

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4119#comment:8>
Django Code <http://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 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