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

Grzegorz Sikorski report at bugs.python.org
Wed Oct 12 06:27:13 EDT 2016


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 the cookie value includes the `,` (see attached example). IMO this should return a tuple instead of single string, but as I said is minor.

More issues I found with actual `requests` library, as it does not send cookies if the server response with 302 (redirect). Again, this may not be related to the urllib at all.

----------
Added file: http://bugs.python.org/file45064/test.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28378>
_______________________________________


More information about the Python-bugs-list mailing list