Josh realized that with new Chrome, because we don't support the type of
compression extension yet we returned a null extension header.
This patch fixes that by deferring issuing the extension header until we
find we have something to say.
tested OK on google-chrome 19.0.1081.2-129295
Reported-by: Josh Roberson <josh@asteriasgi.com>
Signed-off-by: Andy Green <andy.green@linaro.org>
*/
if (wsi->utf8_token[WSI_TOKEN_EXTENSIONS].token_len) {
- strcpy(p, "\x0d\x0aSec-WebSocket-Extensions: ");
- p += strlen("\x0d\x0aSec-WebSocket-Extensions: ");
/*
* break down the list of client extensions
if (ext_count)
*p++ = ',';
+ else {
+ strcpy(p, "\x0d\x0aSec-WebSocket-Extensions: ");
+ p += strlen("\x0d\x0aSec-WebSocket-Extensions: ");
+ }
p += sprintf(p, "%s", ext_name);
ext_count++;
}
}
-
/* end of response packet */
strcpy(p, "\x0d\x0a\x0d\x0a");