Comment & replace something that keeps disappearing
authorIan Cordasco <graffatcolmingov@gmail.com>
Wed, 23 Jan 2013 16:28:30 +0000 (11:28 -0500)
committerIan Cordasco <graffatcolmingov@gmail.com>
Wed, 23 Jan 2013 16:28:30 +0000 (11:28 -0500)
requests/models.py
requests/sessions.py

index 4197eaf..1aacdda 100644 (file)
@@ -225,6 +225,7 @@ class Request(RequestHooksMixin):
         # Note that prepare_auth must be last to enable authentication schemes
         # such as OAuth to work on a fully prepared request.
         p.prepare_auth(self.auth)
+        # This MUST go after prepare_auth. Authenticators could add a hook
         p.prepare_hooks(self.hooks)
 
         return p
index 061983b..d3fc851 100644 (file)
@@ -130,8 +130,9 @@ class SessionRedirectMixin(object):
                     timeout=timeout,
                     verify=verify,
                     cert=cert,
-                    proxies=proxies
-                )
+                    proxies=proxies,
+                    hooks=req.hooks,
+            )
 
             i += 1
             yield resp