From f02573f743458f015d93c67e9b6169b9516fe275 Mon Sep 17 00:00:00 2001 From: Matt McClure Date: Tue, 27 Nov 2012 13:12:21 -0500 Subject: [PATCH] Sign requests even if they have no body data. --- requests/auth.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 -- 2.34.1