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

Clear Content-Length header from redirected requests #394

Merged
merged 2 commits into from
Jun 18, 2021

Conversation

guspower
Copy link
Contributor

This PR removes the Content-Length header from subsequent redirect requests if set. A test verifies the new behaviour.

This issue causes hyper to attempt to read a non-existent body from the redirect GET request, as seen when trying to use wiremock-rs to simulate redirect-on-post behaviour where the POST contains a payload. The issue has be replicated in an example project.

Copy link
Collaborator

@jsha jsha left a comment

Choose a reason for hiding this comment

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

Excellent! Thanks for the fix.

@jsha
Copy link
Collaborator

jsha commented Jun 18, 2021

Hi @guspower ! I thought I'd save you some time by forking your PR into #395, and then I realize I can't self-approve it. Want to merge in my c948d43, then I'll reapprove this and merge?

@guspower
Copy link
Contributor Author

guspower commented Jun 18, 2021 via email

@guspower
Copy link
Contributor Author

guspower commented Jun 18, 2021 via email

@jsha jsha merged commit 37e1e91 into algesten:main Jun 18, 2021
@guspower guspower deleted the fix/redirect-on-post branch June 19, 2021 08:35
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

Successfully merging this pull request may close these issues.

2 participants