From e771aa93861355a704fa6650d59e14256ea0ee89 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Wed, 23 Jan 2013 11:28:30 -0500 Subject: [PATCH] Comment & replace something that keeps disappearing --- requests/models.py | 1 + requests/sessions.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/requests/models.py b/requests/models.py index 4197eaf..1aacdda 100644 --- a/requests/models.py +++ b/requests/models.py @@ -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 diff --git a/requests/sessions.py b/requests/sessions.py index 061983b..d3fc851 100644 --- a/requests/sessions.py +++ b/requests/sessions.py @@ -130,8 +130,9 @@ class SessionRedirectMixin(object): timeout=timeout, verify=verify, cert=cert, - proxies=proxies - ) + proxies=proxies, + hooks=req.hooks, + ) i += 1 yield resp -- 2.7.4