New submission from Alexander Tsepkov <atsep...@gmail.com>:

in Lib/Cookie.py, BaseCookie load() method performs the following comparison on 
line 624:

str(rawdata) == str("")

This breaks when a unicode string is passed in for rawdata. I've included a 
patch that fixes this issue by using isinstance(rawdata, basestring) comparison 
instead. Additionally the patch encodes rawdata in ascii before sending it to 
__ParseString() since that method does not support unicode.

----------
components: Unicode
files: cookie_patch.patch
keywords: patch
messages: 129330
nosy: Alexander.Tsepkov
priority: normal
severity: normal
status: open
title: Cookie.py breaks when passed unicode, fix included
versions: Python 2.6
Added file: http://bugs.python.org/file20883/cookie_patch.patch

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

Reply via email to