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

dev server sets wrong HTTP_HOST when path starts with a double slash #822

Closed
ThiefMaster opened this issue Dec 6, 2015 · 5 comments
Closed
Assignees
Labels

Comments

@ThiefMaster
Copy link
Member

See pallets/flask#1639 (comment)

if request_url.netloc:
    environ['HTTP_HOST'] = request_url.netloc

This code was added in 7486573 / #248. Do absolute http requests even make sense except for HTTP proxies?

@davidism
Copy link
Member

davidism commented Dec 6, 2015

As reported in the linked issue, this can lead to weird behavior. http://127.0.0.1:5000//google.com will redirect to Google.

@mitsuhiko
Copy link
Member

That should definitely be fixed.

@untitaker
Copy link
Member

Perhaps just change if request_url.netloc to if request_url.scheme and request_url.netloc.

@untitaker
Copy link
Member

Triaging: blocker bug

@untitaker
Copy link
Member

Could somebody review #890 and check if I missed something?

untitaker added a commit that referenced this issue Apr 10, 2016
untitaker added a commit that referenced this issue Apr 10, 2016
untitaker added a commit that referenced this issue Apr 10, 2016
untitaker added a commit that referenced this issue Apr 10, 2016
untitaker added a commit that referenced this issue Apr 10, 2016
untitaker added a commit that referenced this issue Apr 14, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants