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

net/http: documentation for interaction between http2 imported and http pkgs. #16412

Closed
gaillard opened this issue Jul 18, 2016 · 6 comments

Comments

Projects
None yet
4 participants
@gaillard
Copy link

commented Jul 18, 2016

Just requesting some documentation for the case when someone does something like

hs := &http.Server{Handler: thehandler}
if err := http2.ConfigureServer(hs, &http2.Server{}); err != nil {
    //handle
}
if err := hs.Serve(existingTLSListener); err != nil {
    //handle
}

and has therefore vendored in the http2 package. How does this interact with the bundled http2 in the http package?

@ianlancetaylor ianlancetaylor changed the title Documentation for interaction between http2 imported and http pkgs. net/http: documentation for interaction between http2 imported and http pkgs. Jul 18, 2016

@gaillard

This comment has been minimized.

Copy link
Author

commented Jul 19, 2016

Any kind of one sentence answer here before documentation is worked on would be highly valued if anyone has the time

@bradfitz

This comment has been minimized.

Copy link
Member

commented Jul 19, 2016

If you import golang.org/x/net/http2 and use it to register the client or server, the (presumably newer) http2 package you imported wins.

The bundled copy is only used as a default.

@gaillard

This comment has been minimized.

Copy link
Author

commented Jul 19, 2016

Much appreciated, but which in the example above is doing the "registering"?

@bradfitz

This comment has been minimized.

Copy link
Member

commented Jul 20, 2016

http2.ConfigureServer

@gaillard

This comment has been minimized.

Copy link
Author

commented Jul 20, 2016

thanks !!

@quentinmit quentinmit added this to the Go1.8 milestone Jul 20, 2016

@quentinmit quentinmit added the NeedsFix label Oct 7, 2016

@gopherbot

This comment has been minimized.

Copy link

commented Nov 11, 2016

CL https://golang.org/cl/33110 mentions this issue.

@gopherbot gopherbot closed this in 0631f29 Nov 11, 2016

@golang golang locked and limited conversation to collaborators Nov 11, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.