Paulie Pena added the comment:
I'd like to second this idea, since it's very confusing without it:
> while waiting for a fix, would it be possible to document in the argparse
> documentation that the 'dest' parameter is required (at least temporarily)
> for add_s
Paulie Pena added the comment:
Here's a simple example. This is correctly parsed via a `SimpleCookie().load()`
call:
'key1=val1, key2=val2'
but this fails to parse:
'key1=val1; expires=Wed, 21 Oct 2015 07:28:00 GMT, key2=val2'
My suggested fix:
str = re.sub(r'
Paulie Pena added the comment:
whoops, the first string should also be a raw string, i.e. `r'...'`
--
___
Python tracker
<https://bugs.python.o
New submission from Paulie Pena :
Since `requests` creates a comma-separated list for any duplicated headers,
this causes a problem when `expires=...` is between two `Set-Cookie` header
values. `BaseCookie.__parse_string()` in
https://github.com/python/cpython/blob/master/Lib/http/cookies.py
Change by Paulie Pena :
--
nosy: +paulie4
___
Python tracker
<https://bugs.python.org/issue29871>
___
___
Python-bugs-list mailing list
Unsubscribe:
Paulie Pena 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
<http://bugs.python.org/is
Paulie Pena 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
imag
Paulie Pena 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.
New submission from Paulie Pena :
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.
cookielib.LWPCookieJar