Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

httplib2 redirect bug #215

Open
ivishnevs opened this issue Feb 8, 2017 · 2 comments
Open

httplib2 redirect bug #215

ivishnevs opened this issue Feb 8, 2017 · 2 comments

Comments

@ivishnevs
Copy link

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 - #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
@ivishnevs
Copy link
Author

ivishnevs commented Feb 8, 2017

It's a tiny workaround for this issue

@ivishnevs
Copy link
Author

@joestump what do you think about it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant