From: Kenneth Reitz Date: Sat, 15 Dec 2012 04:39:10 +0000 (-0500) Subject: always get cookies X-Git-Tag: v1.0.0~77 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2acce4221e38a76ba603e406b0b30db051b0c3e2;p=services%2Fpython-requests.git always get cookies --- 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