kennethreitz/requests — pull request #675 by gulopine (2012-06-14 04:18:19+00:00)
Title: Make sure OAuth doesn't fall off

In particular, this happens when encountering redirects. The first request doesn't have a Content-Type, but the second request does (it was added by the OAuth1 object), so when it tries to apply the authorization details again, it falls off and returns None instead of the original response. This change simply moves the return up one level, so it always returns the request regardless of whether it was modified along the way.