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
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@yonderblue
Copy link

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

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

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

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

@bradfitz
Copy link
Contributor

http2.ConfigureServer

@yonderblue
Copy link
Author

thanks !!

@quentinmit quentinmit added this to the Go1.8 milestone Jul 20, 2016
@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 7, 2016
@gopherbot
Copy link

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.
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants