Paulie Pena <paul...@gmail.com> 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:]{8}\sGMT),', r'\1;', str)

will convert the comma separator to a semicolon, so this will correctly parse:
'key1=val1; expires=Wed, 21 Oct 2015 07:28:00 GMT; key2=val2'

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42256>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to