WebSocket: Add support for "x-webkit-deflate-frame" frame compression

This commit is contained in:
Ignacio Martínez Rivera 2021-08-11 18:35:25 +02:00 committed by Jaap Keuter
parent 5f3278c8d5
commit 5b9c0fde98
1 changed files with 3 additions and 1 deletions

View File

@ -438,9 +438,11 @@ websocket_parse_extensions(websocket_conv_t *websocket_conv, const char *str)
/*
* RFC 7692 permessage-deflate parsing.
* "x-webkit-deflate-frame" is an alias used by some versions of Safari browser
*/
websocket_conv->permessage_deflate = !!strstr(str, "permessage-deflate");
websocket_conv->permessage_deflate = !!strstr(str, "permessage-deflate")
|| !!strstr(str, "x-webkit-deflate-frame");
#ifdef HAVE_ZLIB
websocket_conv->permessage_deflate_ok = pref_decompress &&
websocket_conv->permessage_deflate;