Skip to content

Commit

Permalink
A cleaner and more complete fix for auth/redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfischer committed Nov 3, 2011
1 parent eaf1264 commit 3efd5db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions requests/models.py
Expand Up @@ -96,6 +96,7 @@ def __init__(self,
self.response = Response()

#: Authentication tuple to attach to :class:`Request <Request>`.
self._auth = auth
self.auth = auth_dispatch(auth)

#: CookieJar to attach to :class:`Request <Request>`.
Expand Down Expand Up @@ -237,7 +238,7 @@ def build(resp):
method=method,
# data=self.data,
# params=self.params,
auth=self.auth,
auth=self._auth,
cookies=self.cookies,
redirect=True,
config=self.config
Expand Down Expand Up @@ -338,7 +339,6 @@ def send(self, anyway=False):
r = auth_func(self, *auth_args)

self.__dict__.update(r.__dict__)
self.auth = auth_args

# Build the Urllib2 Request.
req = _Request(url, data=data, headers=headers, method=self.method)
Expand Down

0 comments on commit 3efd5db

Please sign in to comment.