Senthil Kumaran added the comment:
This bug was reported in 2.5 and we don't have a test case attached in this
report. Given many changes and age of the bug, I am closing this.
A specific report against the latest code will help us to fix this bug.
--
stage: -> resolved
status:
Changes by Senthil Kumaran sent...@uthcode.com:
--
assignee: - orsenthil
nosy: +orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12966
___
Paulie Pena paul...@gmail.com added the comment:
RFC 2109's Section 4.1 Syntax: General (http://www.ietf.org/rfc/rfc2109.txt)
states that the attributes and values should be tokens, which the define as
(informally, a sequence of non-special, non-white space characters) from the
HTTP/1.1
Terry J. Reedy tjre...@udel.edu added the comment:
By it crashes on the invalid line do you mean Python raises an exception,
prints a traceback, and exits? Or does it seqfault, dump core, or the Windows
equivavlent?
--
___
Python tracker
Paulie Pena paul...@gmail.com added the comment:
Sorry, by crash I did mean that it raised an exception. My program wasn't
expecting cookielib to fail while reading a cookie file that it had written, so
I didn't wrap the code to read the cookie file in a try..except. I would
imagine that
Terry J. Reedy tjre...@udel.edu added the comment:
It would be better to raise an exception* upon receiving a cookie. On the other
hand, I presume cookies are stored in files that any process can mess with, so
reading failures are always a possibility. So if you want to catch a (very
rare)
Paulie Pena paul...@gmail.com added the comment:
OK, I'll wrap it in a try-except. Do you think the documentation should
updated to make users aware of this possible problem?
Thanks,
Paulie
--
___
Python tracker rep...@bugs.python.org
Terry J. Reedy tjre...@udel.edu added the comment:
Some notes: In 3.x, cookielib is http.cookiejar. LWPCookieJar is a subclass of
FileCookieJar. The module follows RFC 2109 and RFC 2965. RFC 6265 is labelled a
'PROPOSED STANDARD' that 'obsoletes' 2965, but its status is unclear to me. RFC
New submission from Paulie Pena paul...@gmail.com:
Even though RFC 6265's cookie-value's cookie-octet definition says that
whitespace characters are not allowed (see http://tools.ietf.org/html/rfc6265),
there are non-compliant web sites that send cookie values with newlines.