[issue42256] BaseCookie.__parse_string() doesn't work with expires= between cookies

2021-04-16 Thread Paulie Pena
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'(=\w{3},\s[\w\d\s-]{9,11}\s[\d:]

[issue42256] BaseCookie.__parse_string() doesn't work with expires= between cookies

2020-11-03 Thread Paulie Pena
Paulie Pena added the comment: whoops, the first string should also be a raw string, i.e. `r'...'` -- ___ Python tracker ___ ___ Py

[issue42256] BaseCookie.__parse_string() doesn't work with expires= between cookies

2020-11-03 Thread Paulie Pena
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,