Skip to content

Commit 11b9896

Browse files
committed
use the canonical header form
It works anyways but why not?
1 parent 24bd0c7 commit 11b9896

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

websocketproxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ func (w *WebsocketProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
136136

137137
// Only pass those headers to the upgrader.
138138
upgradeHeader := http.Header{}
139-
if hdr := resp.Header.Get("Sec-WebSocket-Protocol"); hdr != "" {
140-
upgradeHeader.Set("Sec-WebSocket-Protocol", hdr)
139+
if hdr := resp.Header.Get("Sec-Websocket-Protocol"); hdr != "" {
140+
upgradeHeader.Set("Sec-Websocket-Protocol", hdr)
141141
}
142142
if hdr := resp.Header.Get("Set-Cookie"); hdr != "" {
143143
upgradeHeader.Set("Set-Cookie", hdr)

0 commit comments

Comments
 (0)