Skip to content

Only add bodyhash when there is actually a body #163

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

Closed
wants to merge 1 commit into from

Conversation

holm
Copy link

@holm holm commented Nov 16, 2014

This avoids the signing of the body, when there isn't any

@@ -484,7 +484,7 @@ def get_normalized_parameters(self):
def sign_request(self, signature_method, consumer, token):
"""Set the signature parameter to the result of sign."""

if not self.is_form_encoded:
if (not self.is_form_encoded) and self.body is not None:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be just and self.body? This will still encode body = ""; not sure if that's expected given your intent here.

@joestump
Copy link
Owner

Needs a regression test as well.

@holm
Copy link
Author

holm commented Feb 10, 2016

Closing in favor of #138

@holm holm closed this Feb 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants