From 2acce4221e38a76ba603e406b0b30db051b0c3e2 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 14 Dec 2012 23:39:10 -0500 Subject: [PATCH] always get cookies --- requests/defaults.py | 4 ---- requests/models.py | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/requests/defaults.py b/requests/defaults.py index a357e25..d8bcb29 100644 --- a/requests/defaults.py +++ b/requests/defaults.py @@ -9,17 +9,13 @@ This module provides the Requests configuration defaults. Configurations: :base_headers: Default HTTP headers. -:verbose: Stream to write request logging to. :max_redirects: Maximum number of redirects allowed within a request.s :keep_alive: Reuse HTTP Connections? :max_retries: The number of times a request should be retried in the event of a connection failure. -:strict_mode: If true, Requests will do its best to follow RFCs (e.g. POST redirects). :pool_maxsize: The maximium size of an HTTP connection pool. :pool_connections: The number of active HTTP connection pools to use. :encode_uri: If true, URIs will automatically be percent-encoded. :trust_env: If true, the surrouding environment will be trusted (environ, netrc). -:store_cookies: If false, the received cookies as part of the HTTP response would be ignored. - """ SCHEMAS = ['http', 'https'] diff --git a/requests/models.py b/requests/models.py index 9c768b5..d7a910e 100644 --- a/requests/models.py +++ b/requests/models.py @@ -204,9 +204,8 @@ class Request(object): # Set encoding. response.encoding = get_encoding_from_headers(response.headers) - # Add new cookies from the server. Don't if configured not to - if self.config.get('store_cookies'): - extract_cookies_to_jar(self.cookies, self, resp) + # Add new cookies from the server. + extract_cookies_to_jar(self.cookies, self, resp) # Save cookies in Response. response.cookies = self.cookies -- 2.7.4