Skip to content
Snippets Groups Projects
Commit 4f5ebec3 authored by Andy Green's avatar Andy Green
Browse files

client ext hdr skip if no arg

parent 43befcba
Branches
Tags
No related merge requests found
...@@ -38,6 +38,7 @@ using up the pool. ...@@ -38,6 +38,7 @@ using up the pool.
8) MAJOR windows-only-POLLHUP was not coming 8) MAJOR windows-only-POLLHUP was not coming
9) Client should not send ext hdr if no exts
Changes Changes
------- -------
......
...@@ -1081,7 +1081,6 @@ lws_generate_client_handshake(struct lws *wsi, char *pkt) ...@@ -1081,7 +1081,6 @@ lws_generate_client_handshake(struct lws *wsi, char *pkt)
/* tell the server what extensions we could support */ /* tell the server what extensions we could support */
p += sprintf(p, "Sec-WebSocket-Extensions: ");
#ifndef LWS_NO_EXTENSIONS #ifndef LWS_NO_EXTENSIONS
ext = context->extensions; ext = context->extensions;
while (ext && ext->callback) { while (ext && ext->callback) {
...@@ -1113,13 +1112,16 @@ lws_generate_client_handshake(struct lws *wsi, char *pkt) ...@@ -1113,13 +1112,16 @@ lws_generate_client_handshake(struct lws *wsi, char *pkt)
if (ext_count) if (ext_count)
*p++ = ','; *p++ = ',';
else
p += sprintf(p, "Sec-WebSocket-Extensions: ");
p += sprintf(p, "%s", ext->client_offer); p += sprintf(p, "%s", ext->client_offer);
ext_count++; ext_count++;
ext++; ext++;
} }
if (ext_count)
p += sprintf(p, "\x0d\x0a");
#endif #endif
p += sprintf(p, "\x0d\x0a");
if (wsi->ietf_spec_revision) if (wsi->ietf_spec_revision)
p += sprintf(p, "Sec-WebSocket-Version: %d\x0d\x0a", p += sprintf(p, "Sec-WebSocket-Version: %d\x0d\x0a",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment