New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cookie module does not parse date #40325
Comments
>>> 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. 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 Thanks and Regards Manlio Perillo |
Logged In: YES This bug is in error; RFC2109 specifies the BNF grammar as: av-pairs = av-pair *(";" av-pair) If you surround the date in double quotes, as per the RFC, |
Logged In: YES Closing as 'not a bug'. This decision could be reversed if there's some |
Logged In: YES insomnike wrote that RFC2109 requires double quotes. Moreover (as I can see) the same Cookie module follow the >>> import Cookie
>>> c = Cookie.SimpleCookie()
>>> c['key'] = 'value'
>>> c['key']['expires'] = 10
>>> c.output()
'Set-Cookie: key=value; expires=Sun, 06-Jun-2004 10:36:24 GMT;'
>>> s = c.output()
>>> nc = Cookie.SimpleCookie(s)
>>> nc.output()
'Set-Cookie: key=value; expires=Sun,;' Thanks and regards Manlio Perillo |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: