mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
client ext hdr skip if no arg
https://github.com/warmcat/libwebsockets/issues/453 Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
a4330f313a
commit
f192c01a13
2 changed files with 10 additions and 2 deletions
|
@ -1,6 +1,11 @@
|
||||||
Changelog
|
Changelog
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
Fixes
|
||||||
|
-----
|
||||||
|
|
||||||
|
1) MINOR: d9n't send ext hdr if no exts to discuss
|
||||||
|
|
||||||
v1.7.3
|
v1.7.3
|
||||||
======
|
======
|
||||||
|
|
||||||
|
|
|
@ -956,7 +956,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) {
|
||||||
|
@ -988,13 +987,17 @@ 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",
|
||||||
|
|
Loading…
Add table
Reference in a new issue