Created on 2012-03-27 17:37 by valtron, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Files |
|
|
|
File name |
Uploaded |
Description |
Edit |
cookie_3.py |
federico.reghenzani,2012-03-27 18:16 |
review |
|
Messages (7) |
|
|
msg156946 - (view) |
Author: valtron (valtron) |
Date: 2012-03-27 17:37 |
Cookie.py doesn't format the expiry date correctly. The problematic line is: http://hg.python.org/cpython/file/2.7/Lib/Cookie.py#l393, which should read 'return "%s, %02d %3s %4d %02d:%02d:%02d GMT" % \' (spaces instead of dashes). The RFC specifying the date format is http://tools.ietf.org/html/rfc2616#section-3.3.1; you can see that with dashes, only a 2-digit year is allowed (date2). |
|
|
msg156949 - (view) |
Author: Federico Reghenzani (federico.reghenzani) * |
Date: 2012-03-27 18:16 |
The same problem is present in newest version of Python. I attacched a patch for python 3. |
|
|
msg157021 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2012-03-29 10:10 |
Thanks for the patch. However, the RFC is one thing, but what happens in the real world? Cookies are very messy in the real world, and we cannot just assume that the RFC version works. |
|
|
msg161179 - (view) |
Author: Senthil Kumaran (orsenthil) *  |
Date: 2012-05-20 03:41 |
Actually, the claim is correct, there is no dash separated expiry dates even in the real world. Tested with couple of sites like gmail, wikipedia and few more. |
|
|
msg161181 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2012-05-20 04:08 |
New changeset 1db41c410f63 by Senthil Kumaran in branch '2.7': Issue #14426: Correct the Date format in Expires attribute of Set-Cookie. Patch by Federico Reghenzani and Müte Invert http://hg.python.org/cpython/rev/1db41c410f63 New changeset a5fa068143eb by Senthil Kumaran in branch '3.2': Issue #14426: Correct the Date format in Expires attribute of Set-Cookie. Patch by Federico Reghenzani and Müte Invert http://hg.python.org/cpython/rev/a5fa068143eb New changeset 32cf38bfb36f by Senthil Kumaran in branch '3.2': news for Issue14426 http://hg.python.org/cpython/rev/32cf38bfb36f New changeset 8e476cca25ff by Senthil Kumaran in branch 'default': Issue #14426: Correct the Date format in Expires attribute of Set-Cookie. Patch by Federico Reghenzani and Müte Invert http://hg.python.org/cpython/rev/8e476cca25ff New changeset 90ffd6c98057 by Senthil Kumaran in branch 'default': news for Issue14426 http://hg.python.org/cpython/rev/90ffd6c98057 |
|
|
msg161182 - (view) |
Author: Senthil Kumaran (orsenthil) *  |
Date: 2012-05-20 04:25 |
This is fixed in all the branches. Note here - the test change is actually not the coverage because Cookie tests cover the scenarios of SimpleCookie class of both loading the formatted date and setting the formatted date. It is only testing the setting of expires header and not the format of the date. The Morsel class and "all" it's method needs to be covered by separate tests and coverage of this change would fall in there. I think, this should be tracked in a different issue. |
|
|
msg161192 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2012-05-20 09:00 |
New changeset f457419552e3 by Senthil Kumaran in branch '2.7': Fix for - buildbots here I come http://hg.python.org/cpython/rev/f457419552e3 New changeset f9d31d6977f1 by Senthil Kumaran in branch '3.2': Fix for - buildbots here I come http://hg.python.org/cpython/rev/f9d31d6977f1 New changeset ca2a793d6c7b by Senthil Kumaran in branch 'default': merge - Fix for - buildbots here I come http://hg.python.org/cpython/rev/ca2a793d6c7b |
|
|
History |
|
|
|
Date |
User |
Action |
Args |
2022-04-11 14:57:28 |
admin |
set |
github: 58634 |
2012-05-20 09:00:22 |
python-dev |
set |
messages: + |
2012-05-20 04:25:19 |
orsenthil |
set |
status: open -> closedmessages: + assignee: orsenthilresolution: fixedstage: test needed -> resolved |
2012-05-20 04:08:46 |
python-dev |
set |
nosy: + python-devmessages: + |
2012-05-20 03:41:12 |
orsenthil |
set |
messages: + |
2012-05-06 22:40:40 |
ezio.melotti |
set |
keywords: + easynosy: + ezio.melotti |
2012-03-29 10:10:46 |
r.david.murray |
set |
nosy: + r.david.murraymessages: + |
2012-03-28 05:28:09 |
eric.araujo |
set |
nosy: + orsenthiltitle: Lib/Cookie.py date format problem -> date format problem in Cookie/http.cookiesstage: test neededversions: - Python 3.1 |
2012-03-27 18:16:51 |
federico.reghenzani |
set |
files: + cookie_3.pyversions: + Python 3.1, Python 3.2, Python 3.3nosy: + federico.reghenzanimessages: + |
2012-03-27 17:37:58 |
valtron |
create |
|