[Libwebsockets] LWS and permessage-deflate

Felipe Gasper felipe at felipegasper.com
Tue Jul 6 17:09:31 CEST 2021


Hello,

	The WS compression spec (RFC 7692) describes a workflow where giving permessage-deflate multiple times in the client handshake allows the server to choose which configuration it will allow.

	(cf. https://datatracker.ietf.org/doc/html/rfc7692#section-7.1.3)

	Does LWS support this? I don’t have a server implementation set up that facilitates easy testing, but would it be something like this?

-----
struct lws_extension[] extensions = {
    {
        .name = "permessage-deflate",
        .callback = lws_extension_callback_pm_deflate,
        .client_offer = "permessage-deflate; client_max_window_bits; server_max_window_bits=10",
    },
    {
        .name = "permessage-deflate",
        .callback = lws_extension_callback_pm_deflate,
        .client_offer = "permessage-deflate; client_max_window_bits",
    },
    { NULL },
};
-----

	Thank you!

cheers,
-FG


More information about the Libwebsockets mailing list