[issue28378] urllib2 does not handle cookies with `,`

2016-10-06 Thread Grzegorz Sikorski
New submission from Grzegorz Sikorski: I have a usecase when the server sends two cookies in separate `Set-Cookie` headers. One of the cookie includes a `,` (comma). It seems this is not handled properly, as the library always try to fold multiple headers with the same name into a single

[issue28378] urllib2 does not handle cookies with `,`

2016-10-07 Thread Grzegorz Sikorski
Grzegorz Sikorski added the comment: It looks urllib2 works with this scenario, but upper level request fails. -- ___ Python tracker <http://bugs.python.org/issue28

[issue28378] urllib2 does not handle cookies with `,`

2016-10-12 Thread Grzegorz Sikorski
Grzegorz Sikorski added the comment: I was debugging this and found out that urllib2 works more-less correct. The only problem I would see is referring to the header by `res.headers['Set-Cookie']`, as it returns comma-separated string, which cannot be processed properly in case

[issue28378] urllib2 does not handle cookies with `,`

2016-10-12 Thread Grzegorz Sikorski
Grzegorz Sikorski added the comment: I attach example express/nodejs server which by default returns a cookie with the comma (see expiry time format). The output from the python test file I posted in previous message is: ``` python test.py cookie1=exampleCookie; Path=/, cookie2=cookie%20with