-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Milestone
Description
Partial continuation of #12737 which made it possible to fix the problem for http2, but not http1.
As pointed out in the cmux readme's limitations section:
TLS: Since cmux sits in between the actual listener and the mux'ed listeners, TLS handshake is not handled inside the actual servers. Because of that, you can serve HTTPS using cmux but http.Request.TLS would not be set in your handlers.
This is really due to the type assertion used to identify TLS connections, which sadly breaks the goodness of net.Conn and net.Listener being interfaces.
Relevant code: https://github.com/golang/go/blob/release-branch.go1.6/src/net/http/server.go#L1398:L1410
Can this type assertion to a concrete type be replaced with an assertion to an interface?