From e6288e2d0751502eee1a44723a36230c12b821f3 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 24 Jul 2011 16:08:27 +1200 Subject: [PATCH] Fix crash when sticky cookies are read from file. Cookielib expects strings, not unicode. --- libmproxy/flow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmproxy/flow.py b/libmproxy/flow.py index d174b41fa..3078c4e09 100644 --- a/libmproxy/flow.py +++ b/libmproxy/flow.py @@ -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]):