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

Already on GitHub? Sign in to your account

httpserver: If no X-Scheme header, use the normal request value. #695

Merged
merged 1 commit into from Mar 13, 2013

Conversation

Projects
None yet
2 participants
Contributor

evanj commented Mar 12, 2013

We ran into this problem when testing OAuth redirects on local development servers. In production, we use a reverse proxy. In testing, we use a local development server. It was always generating a redirect to http://localhost instead of https://localhost because of this issue.

Commit message:

Previously, if xheaders is True and there are no X headers passed (e.g. when
developing locally), scheme was always "http". This makes in "http" or
"https", based on what was actually used for the request.

Add tests for the X-Scheme and X-Forwarded-Proto headers.

httpserver: If no X-Scheme header, use the normal request value.
Previously, if xheaders is True and there are no X headers passed (e.g. when
developing locally), scheme was always "http". This makes in "http" or
"https", based on what was actually used for the request.

Add tests for the X-Scheme and X-Forwarded-Proto headers.

bdarnell added a commit that referenced this pull request Mar 13, 2013

Merge pull request #695 from evanj/master
httpserver: If no X-Scheme header, use the normal request value.

@bdarnell bdarnell merged commit 330d8ec into tornadoweb:master Mar 13, 2013

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment