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

Better handling of HTTP redirects. #530

Merged
merged 2 commits into from
Oct 11, 2019
Merged

Better handling of HTTP redirects. #530

merged 2 commits into from
Oct 11, 2019

Conversation

brian-brazil
Copy link
Contributor

If the redirect is to a different host, don't set ServerName.
Fixes #237.

@discordianfish @SuperQ

@brian-brazil brian-brazil force-pushed the redirect branch 3 times, most recently from 8f0a3f6 to f0c7711 Compare October 11, 2019 11:20
If the redirect is to a different host, don't set ServerName.
Fixes #237.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
It can be called concurrently, and after the request has finished.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
@SuperQ
Copy link
Member

SuperQ commented Oct 11, 2019

Hrm, I think I get it. Wouldn't we want to use the new ServerName provided by the redirect?

@brian-brazil
Copy link
Contributor Author

We don't need to, as the http library will handle it for us. We only need to play around with the first request as we've set the Host header by hand.

Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

Redirect to different HTTPS host broken
2 participants