Fix crash when sticky cookies are read from file.

Cookielib expects strings, not unicode.
This commit is contained in:
Aldo Cortesi 2011-07-24 16:08:27 +12:00
parent 0f4ae61e7d
commit e6288e2d07

View File

@ -142,7 +142,7 @@ class StickyCookieState:
for i in f.response.headers["set-cookie"]:
# FIXME: We now know that Cookie.py screws up some cookies with
# valid RFC 822/1123 datetime specifications for expiry. Sigh.
c = Cookie.SimpleCookie(i)
c = Cookie.SimpleCookie(str(i))
m = c.values()[0]
k = self.ckey(m, f)
if cookielib.domain_match(f.request.host, k[0]):