[ python-Bugs-964861 ] Cookie module does not parse date
SourceForge.net
noreply at sourceforge.net
Sat Jun 5 16:50:15 EDT 2004
Bugs item #964861, was opened at 2004-06-02 05:02
Message generated for change (Comment added) made by akuchling
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=964861&group_id=5470
Category: Python Library
Group: None
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Submitted By: Manlio Perillo (manlioperillo)
>Assigned to: A.M. Kuchling (akuchling)
Summary: Cookie module does not parse date
Initial Comment:
>>> sys.version
'2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit
(Intel)]'
>>> sys.platform
'win32'
>>> sys.getwindowsversion()
(5, 1, 2600, 2, '')
Hi.
The standard Cookie module does not parse date string.
Here is and example:
>>> import Cookie
>>> s = 'Set-Cookie: key=value; path=/; expires=Fri,
21-May-2004 10:40:51 GMT'
>>> c = Cookie.BaseCookie(s)
>>> print c
Set-Cookie: key=value; expires=Fri,; Path=/;
In the attached file I have reported the correct (I
think) regex pattern.
Thanks and Regards Manlio Perillo
----------------------------------------------------------------------
>Comment By: A.M. Kuchling (akuchling)
Date: 2004-06-05 16:50
Message:
Logged In: YES
user_id=11375
Closing as 'not a bug'. This decision could be reversed if there's some
common application or software that returns cookies without quoting the
date properly.
----------------------------------------------------------------------
Comment By: Aaron Brady (insomnike)
Date: 2004-06-05 09:43
Message:
Logged In: YES
user_id=1057404
This bug is in error; RFC2109 specifies the BNF grammar as:
av-pairs = av-pair *(";" av-pair)
av-pair = attr ["=" value] ;
optional value
attr = token
value = word
word = token | quoted-string
If you surround the date in double quotes, as per the RFC,
then the above works correctly.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=964861&group_id=5470
More information about the Python-bugs-list
mailing list