BIGFIX (fuck it)

This commit is contained in:
xdrm-brackets 2018-05-02 22:36:59 +02:00
parent 9abf760e37
commit e9b66b87b7
1 changed files with 2 additions and 2 deletions

View File

@ -54,14 +54,14 @@ func (r T) Send(w io.Writer) (int, error) {
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 {
headers = fmt.Sprintf("%sSec-WebSocket-Accept: %s\r\n", headers, r.accept)
}
headers = fmt.Sprintf("%s\r\n", headers)
/* (3) Build all */
raw := []byte(fmt.Sprintf("%s%s\r\n", responseLine, headers))
raw := []byte(fmt.Sprintf("%s%s", responseLine, headers))
/* (4) Write */
written, err := w.Write(raw)