From: nonm Date: Mon, 18 Nov 2013 21:32:59 +0000 (-0800) Subject: Small fix broken cookie parse X-Git-Tag: v2.1.0~19^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cfbbd15de72a616fd9c648e1a0724acf2528db1b;p=services%2Fpython-requests.git Small fix broken cookie parse --- 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)