always get cookies
authorKenneth Reitz <me@kennethreitz.com>
Sat, 15 Dec 2012 04:39:10 +0000 (23:39 -0500)
committerKenneth Reitz <me@kennethreitz.com>
Sat, 15 Dec 2012 04:39:10 +0000 (23:39 -0500)
requests/defaults.py
requests/models.py

index a357e25..d8bcb29 100644 (file)
@@ -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']
index 9c768b5..d7a910e 100644 (file)
@@ -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