diff options
author | 2024-08-06 11:52:27 +0200 | |
---|---|---|
committer | 2024-08-06 11:52:27 +0200 | |
commit | 4697271cef3de3e1213722bb7ac88d5a8deac830 (patch) | |
tree | 2f1cc9817bf1adbceb8d3a6726c8497181897676 /internal/api/client/streaming/streaming_test.go | |
parent | [chore]: Bump golang.org/x/oauth2 from 0.21.0 to 0.22.0 (#3171) (diff) | |
download | gotosocial-4697271cef3de3e1213722bb7ac88d5a8deac830.tar.xz |
[bugfix] send back Sec-Websocket-Protocol header for streaming WebSocket (#3169)
* [bugfix] send back Sec-Websocket-Protocol header for streaming WebSocket
Chrome expects the selected Sec-Websocket-Protocol to be sent back
on the WebSocket upgrade request (RFC6455 1.9).
* fiddle a bit to avoid getting headers multiple times
* add some explanatory notes
---------
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Diffstat (limited to 'internal/api/client/streaming/streaming_test.go')
-rw-r--r-- | internal/api/client/streaming/streaming_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/api/client/streaming/streaming_test.go b/internal/api/client/streaming/streaming_test.go index 1d94a87ec..acdcafd8a 100644 --- a/internal/api/client/streaming/streaming_test.go +++ b/internal/api/client/streaming/streaming_test.go @@ -22,7 +22,7 @@ import ( "encoding/base64" "errors" "fmt" - "io/ioutil" + "io" "net" "net/http" "net/http/httptest" @@ -236,7 +236,7 @@ func (suite *StreamingTestSuite) TestSecurityHeader() { result := recorder.Result() defer result.Body.Close() - b, err := ioutil.ReadAll(result.Body) + b, err := io.ReadAll(result.Body) suite.NoError(err) // check response |