Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
net/http/httputil: ReverseProxy fails to proxy h2c #33452
What version of Go are you using (
ReverseProxy proxies requests, not transports.
A ReverseProxy is just a net/http.Handler that you can run on an HTTP server (which might speak 3 protocol versions times TLS or not). But the ReverseProxy does its backend request using the provided https://golang.org/pkg/net/http/httputil/#ReverseProxy.Transport and whatever transport it selects. There's no design goal or effort for those two transports to be the same. They very often are not (e.g. HTTP/2 TLS to the world, but HTTP/1.1 plaintext internally).
It does if you configure both halves to do so, yes.