BIGFIX (fuck it)
This commit is contained in:
parent
9abf760e37
commit
e9b66b87b7
|
@ -54,14 +54,14 @@ func (r T) Send(w io.Writer) (int, error) {
|
||||||
optionalProtocol = fmt.Sprintf("Sec-WebSocket-Protocol: %s\r\n", r.protocol)
|
optionalProtocol = fmt.Sprintf("Sec-WebSocket-Protocol: %s\r\n", r.protocol)
|
||||||
}
|
}
|
||||||
|
|
||||||
headers := fmt.Sprintf("Upgrade: websocket\t\nConnection: Upgrade\r\nSec-WebSocket-Version: %d\r\n%s", WSVersion, optionalProtocol)
|
headers := fmt.Sprintf("Upgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Version: %d\r\n%s", WSVersion, optionalProtocol)
|
||||||
if r.accept != nil {
|
if r.accept != nil {
|
||||||
headers = fmt.Sprintf("%sSec-WebSocket-Accept: %s\r\n", headers, r.accept)
|
headers = fmt.Sprintf("%sSec-WebSocket-Accept: %s\r\n", headers, r.accept)
|
||||||
}
|
}
|
||||||
headers = fmt.Sprintf("%s\r\n", headers)
|
headers = fmt.Sprintf("%s\r\n", headers)
|
||||||
|
|
||||||
/* (3) Build all */
|
/* (3) Build all */
|
||||||
raw := []byte(fmt.Sprintf("%s%s\r\n", responseLine, headers))
|
raw := []byte(fmt.Sprintf("%s%s", responseLine, headers))
|
||||||
|
|
||||||
/* (4) Write */
|
/* (4) Write */
|
||||||
written, err := w.Write(raw)
|
written, err := w.Write(raw)
|
||||||
|
|
Loading…
Reference in New Issue