From cfbbd15de72a616fd9c648e1a0724acf2528db1b Mon Sep 17 00:00:00 2001 From: nonm Date: Mon, 18 Nov 2013 13:32:59 -0800 Subject: [PATCH] Small fix broken cookie parse --- requests/cookies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requests/cookies.py b/requests/cookies.py index 12245fc..a4140ad 100644 --- a/requests/cookies.py +++ b/requests/cookies.py @@ -278,7 +278,7 @@ class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping): remove_cookie_by_name(self, name) def set_cookie(self, cookie, *args, **kwargs): - if cookie.value.startswith('"') and cookie.value.endswith('"'): + if hasattr(cookie.value, 'startswith') and cookie.value.startswith('"') and cookie.value.endswith('"'): cookie.value = cookie.value.replace('\\"', '') return super(RequestsCookieJar, self).set_cookie(cookie, *args, **kwargs) -- 2.34.1