From 756aa82aa90bd06e9e2ac32c63e07cc8793c0b22 Mon Sep 17 00:00:00 2001 From: Thomas Brandstetter Date: Tue, 21 Apr 2020 17:16:05 +0200 Subject: [PATCH] Fix case-sensitive header Sec-Websocket-Version --- pkg/server/service/proxy.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/server/service/proxy.go b/pkg/server/service/proxy.go index e27afc60c..45d714e5e 100644 --- a/pkg/server/service/proxy.go +++ b/pkg/server/service/proxy.go @@ -62,12 +62,15 @@ func buildProxy(passHostHeader *bool, responseForwarding *dynamic.ResponseForwar } // Even if the websocket RFC says that headers should be case-insensitive, - // some servers need Sec-WebSocket-Key and Sec-WebSocket-Protocol to be case-sensitive. + // some servers need Sec-WebSocket-Key, Sec-WebSocket-Protocol and Sec-WebSocket-Version + // to be case-sensitive. // https://tools.ietf.org/html/rfc6455#page-20 outReq.Header["Sec-WebSocket-Key"] = outReq.Header["Sec-Websocket-Key"] outReq.Header["Sec-WebSocket-Protocol"] = outReq.Header["Sec-Websocket-Protocol"] + outReq.Header["Sec-WebSocket-Version"] = outReq.Header["Sec-Websocket-Version"] delete(outReq.Header, "Sec-Websocket-Key") delete(outReq.Header, "Sec-Websocket-Protocol") + delete(outReq.Header, "Sec-Websocket-Version") }, Transport: defaultRoundTripper, FlushInterval: time.Duration(flushInterval),