Skip to content
Myr

Merge pull request #967 from matthewlmcclure/sign-without-body

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Sign requests even if they have no body data.

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 7fea9af, f02573f · Browse files · 1 file+1 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−3 removed

  • other:+1 added−3 removed

1 file+1 added−3 removed

modified:requests/auth.py+1 added-3 removed
103 unmodified lines
104 r.url, r.headers, r.data = self.client.sign(unicode(r.full_url),105 unicode(r.method),106 r.data,107 r.headers)108 elif r.data:108 else:109 # The data we passed was either definitely not urlencoded110 # (because extract_params returned nothing) or doesn't have a111 # content header that assures us that it is. Assume then that the112 # data shouldn't be part of the signature.113 r.url, r.headers, _ = self.client.sign(unicode(r.full_url),114 unicode(r.method),115 None,116 r.headers)117 else:118 _oauth_signed = False117 if _oauth_signed:118 # Both flows add params to the URL by using r.full_url,119 # so this prevents adding it again later120 r.params = {}
274 unmodified lines