otelhttp.Transport
is unable to properly handle protocol switching (e.g. for websockets)
#1329
Labels
Milestone
Attempting to proxy a websocket through the
otelhttp.Transport
returns a 502 and this message:http: proxy error: internal error: 101 switching protocols response with non-writable body
.It may also affect H2C connections (and anything that provides write access to the underlying TCP connection) as stated by the Go source.
The smallest possible fix I could think of was this: djcass44@3f58f5c which disables the wrapping of the response body if the http response code is
101
This feels like a hack, however it does work. Have you got any thoughts on an optimal implementation?
The text was updated successfully, but these errors were encountered: