From: Matt McClure Date: Tue, 27 Nov 2012 18:12:21 +0000 (-0500) Subject: Sign requests even if they have no body data. X-Git-Tag: v1.0.0~103^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f02573f743458f015d93c67e9b6169b9516fe275;p=services%2Fpython-requests.git Sign requests even if they have no body data. --- diff --git a/requests/auth.py b/requests/auth.py index b662397..f86c0cc 100644 --- a/requests/auth.py +++ b/requests/auth.py @@ -105,7 +105,7 @@ class OAuth1(AuthBase): unicode(r.method), r.data, r.headers) - elif r.data: + else: # The data we passed was either definitely not urlencoded # (because extract_params returned nothing) or doesn't have a # content header that assures us that it is. Assume then that the @@ -114,8 +114,6 @@ class OAuth1(AuthBase): unicode(r.method), None, r.headers) - else: - _oauth_signed = False if _oauth_signed: # Both flows add params to the URL by using r.full_url, # so this prevents adding it again later