mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #5816 -- Fixed a regression from [6333] that generates incorrect cookie "expires" dates when using a locale other than English. Introduced http_date and cookie_date utility functions. Thanks for the report Michael Lemaire. Thanks for the patch Karen Tracey and SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6634 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -27,6 +27,14 @@ u'Paris+%26+Orl%C3%A9ans'
|
||||
>>> urlquote_plus(u'Paris & Orl\xe9ans', safe="&")
|
||||
u'Paris+&+Orl%C3%A9ans'
|
||||
|
||||
### cookie_date, http_date ###############################################
|
||||
>>> from django.utils.http import cookie_date, http_date
|
||||
>>> t = 1167616461.0
|
||||
>>> cookie_date(t)
|
||||
'Mon, 01-Jan-2007 01:54:21 GMT'
|
||||
>>> http_date(t)
|
||||
'Mon, 01 Jan 2007 01:54:21 GMT'
|
||||
|
||||
### iri_to_uri ###########################################################
|
||||
>>> from django.utils.encoding import iri_to_uri
|
||||
>>> iri_to_uri(u'red%09ros\xe9#red')
|
||||
|
||||
Reference in New Issue
Block a user