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
yonderblue opened this issue Jul 18, 2016 · 6 comments
Closed
Assignees
Milestone

Comments

@yonderblue
Copy link

@yonderblue yonderblue 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
@yonderblue
Copy link
Author

@yonderblue yonderblue 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
Copy link
Contributor

@bradfitz bradfitz 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.

@yonderblue
Copy link
Author

@yonderblue yonderblue commented Jul 19, 2016

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

@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Jul 20, 2016

http2.ConfigureServer

@yonderblue
Copy link
Author

@yonderblue yonderblue 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
Copy link

@gopherbot gopherbot commented Nov 11, 2016

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants