python-oauth2
python-oauth2 copied to clipboard
httplib2 redirect bug
if 'location' header is in response object, http2lib try to redirect and use self.request method with body=None argument; this behavior implies a problem like this - https://github.com/joestump/python-oauth2/issues/203 and etc.
if response.status in [302, 303]:
redirect_method = "GET"
body = None <---------
(response, content) = self.request(
location, method=redirect_method, body=body,
headers=headers, redirections=redirections - 1)
File "/Users/speedingdeer/code/.../pyvenv3.4/lib/python3.4/site-packages/oauth2/init.py", line 493, in sign_request
self['oauth_body_hash'] = base64.b64encode(sha1(self.body).digest())
TypeError: object supporting the buffer API required
It's a tiny workaround for this issue
@joestump what do you think about it?