WebSocket: remember to send the protocol version

This commit is contained in:
Přemysl Eric Janouch 2017-02-06 18:39:33 +01:00
parent d73aa0436c
commit 753d5f02ae
Signed by: p
GPG Key ID: B715679E3A361BE6

View File

@ -2071,6 +2071,7 @@ backend_ws_connect (struct ws_context *self, struct error **e)
str_append_printf (&request, "Upgrade: websocket\r\n");
str_append_printf (&request, "Connection: upgrade\r\n");
str_append_printf (&request, SEC_WS_KEY ": %s\r\n", key_b64_string);
str_append_printf (&request, SEC_WS_VERSION ": %s\r\n", "13");
for (size_t i = 0; i < self->extra_headers.len; i++)
str_append_printf (&request, "%s\r\n", self->extra_headers.vector[i]);
str_append_printf (&request, "\r\n");