diff options
| author | Shulhan <ms@kilabit.info> | 2019-03-20 23:44:27 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2019-03-20 23:44:27 +0700 |
| commit | 1102dae593a3d9673d23b612da6aed52e97841af (patch) | |
| tree | 2a33228cde523101174cd7167ea8c0b09adcf011 /lib/websocket/server_test.go | |
| parent | 6740da2369bf6324ddc0f7303ea2dd4b008fbfe4 (diff) | |
| download | pakakeh.go-1102dae593a3d9673d23b612da6aed52e97841af.tar.xz | |
websocket: use custom HTTP parser for client
The problem with using the standard http.ReadResponse is that the
received packet may contains WebSocket frame, not just HTTP response.
This cause the initial frame lost, which may required by client (for
example, as a response for authentication).
Diffstat (limited to 'lib/websocket/server_test.go')
| -rw-r--r-- | lib/websocket/server_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/websocket/server_test.go b/lib/websocket/server_test.go index 8df648f4..94d6e7f4 100644 --- a/lib/websocket/server_test.go +++ b/lib/websocket/server_test.go @@ -266,7 +266,7 @@ func TestServerHandshake(t *testing.T) { fmt.Fprintf(&bb, "\r\n") - err = cl.doHandshake("", bb.Bytes()) + _, err = cl.doHandshake("", bb.Bytes()) if err != nil { test.Assert(t, "error", c.expError, err.Error(), true) } |
