Message380294
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, in that case, will just give up, since it thinks it was given an invalid cookie. The fix is to replace the comma at the end of each trailing `expires=...` with a semicolon. Inside `BaseCookie.__parse_string()`, before the `while` loop, all that should be needed is to add this:
```
str = re.sub('(=\w{3},\s[\w\d\s-]{9,11}\s[\d:]{8}\sGMT),', r'\1;', str)
``` |
|
Date |
User |
Action |
Args |
2020-11-03 19:17:21 | paulie4 | set | recipients:
+ paulie4 |
2020-11-03 19:17:21 | paulie4 | set | messageid: <1604431041.17.0.875441243707.issue42256@roundup.psfhosted.org> |
2020-11-03 19:17:21 | paulie4 | link | issue42256 messages |
2020-11-03 19:17:20 | paulie4 | create | |
|