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

x/net/http2: scheme is hardcoded to https #17257

ayanamist opened this issue Sep 28, 2016 · 2 comments

x/net/http2: scheme is hardcoded to https #17257

ayanamist opened this issue Sep 28, 2016 · 2 comments


Copy link

@ayanamist ayanamist commented Sep 28, 2016
Here scheme is hardcoded to https, but for #15830 the scheme may be http, so the request received by h2c server has wrong scheme.
When using with a http2 proxy, this leads to a wrong request, GET becomes GET when remote proxy server received, and wrong content is fetced.

@bradfitz bradfitz added this to the Unreleased milestone Sep 28, 2016
@bradfitz bradfitz added the Suggested label Sep 28, 2016
Copy link

@bradfitz bradfitz commented Sep 28, 2016

I have a full plate and am not prioritizing any non-https features or fixes in the http2 package, but somebody else can take this bug.

Copy link

@ayanamist ayanamist commented Sep 29, 2016

@bradfitz I fix it and add some test.
Do you know who can review it?

@golang golang locked and limited conversation to collaborators Sep 29, 2017
c3mb0 pushed a commit to c3mb0/net that referenced this issue Apr 2, 2018
The existing implementation has a hardcoded "https" scheme for
all request, since it allows http scheme in the request, it should
use the scheme in the request url.

Fixes golang/go#17257

Change-Id: Ibd9528df0328d7630ee94a006db694645625cdc9
Run-TryBot: Brad Fitzpatrick <>
TryBot-Result: Gobot Gobot <>
Reviewed-by: Brad Fitzpatrick <>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants