f439ffe
From 2cecc4bc828fc1754cc26f279ec3ff5cd65cb8f7 Mon Sep 17 00:00:00 2001
f439ffe
From: Ralph Bean <rbean@redhat.com>
f439ffe
Date: Thu, 31 Jan 2013 21:38:58 -0500
f439ffe
Subject: [PATCH] cookie handling
f439ffe
f439ffe
---
f439ffe
 requests/models.py | 5 +++--
f439ffe
 1 file changed, 3 insertions(+), 2 deletions(-)
f439ffe
f439ffe
Index: requests-0.13.1/requests/models.py
f439ffe
===================================================================
f439ffe
--- requests-0.13.1.orig/requests/models.py
f439ffe
+++ requests-0.13.1/requests/models.py
f439ffe
@@ -16,7 +16,7 @@ from .structures import CaseInsensitiveD
f439ffe
 from .status_codes import codes
f439ffe
 
f439ffe
 from .auth import HTTPBasicAuth, HTTPProxyAuth
f439ffe
-from .cookies import cookiejar_from_dict, extract_cookies_to_jar, get_cookie_header
f439ffe
+from .cookies import cookiejar_from_dict, extract_cookies_to_jar, get_cookie_header, RequestsCookieJar
f439ffe
 from .packages.urllib3.exceptions import MaxRetryError, LocationParseError
f439ffe
 from .packages.urllib3.exceptions import SSLError as _SSLError
f439ffe
 from .packages.urllib3.exceptions import HTTPError as _HTTPError
f439ffe
@@ -201,7 +201,8 @@ class Request(object):
f439ffe
                     extract_cookies_to_jar(self.cookies, self, resp)
f439ffe
 
f439ffe
                 # Save cookies in Response.
f439ffe
-                response.cookies = self.cookies
f439ffe
+                response.cookies = RequestsCookieJar()
f439ffe
+                extract_cookies_to_jar(response.cookies, self, resp)
f439ffe
 
f439ffe
                 # Save cookies in Session.
f439ffe
                 for cookie in self.cookies: