Use session defaults instead of arbitrary ones
authorIan Cordasco <graffatcolmingov@gmail.com>
Sat, 30 Mar 2013 00:18:58 +0000 (20:18 -0400)
committerIan Cordasco <graffatcolmingov@gmail.com>
Sat, 30 Mar 2013 00:18:58 +0000 (20:18 -0400)
requests/sessions.py

index 961fc3b..6a68c43 100644 (file)
@@ -431,9 +431,10 @@ class Session(SessionRedirectMixin):
         """Send a given PreparedRequest."""
         # Set defaults that the hooks can utilize to ensure they always have
         # the correct parameters to reproduce the previous request.
-        kwargs.setdefault('stream', False)
-        kwargs.setdefault('verify', True)
-        kwargs.setdefault('proxies', {})
+        kwargs.setdefault('stream', self.stream)
+        kwargs.setdefault('verify', self.verify)
+        kwargs.setdefault('cert', self.cert)
+        kwargs.setdefault('proxies', self.proxies
 
         # It's possible that users might accidentally send a Request object.
         # Guard against that specific failure case.