diff --git a/lib/libwebsockets.h b/lib/libwebsockets.h index f252892c..99a9595f 100644 --- a/lib/libwebsockets.h +++ b/lib/libwebsockets.h @@ -1016,8 +1016,7 @@ enum lws_callback_reasons { * and with in being the extension name, len is 0 and user is * valid. Note though at this time the ESTABLISHED callback hasn't * happened yet so if you initialize user content there, user - * content during this callback might not be useful for anything. - * Notice this callback comes to protocols[0]. */ + * content during this callback might not be useful for anything. */ LWS_CALLBACK_CLIENT_CONFIRM_EXTENSION_SUPPORTED = 26, /**< When a client * connection is being prepared to start a handshake to a server, diff --git a/lib/server-handshake.c b/lib/server-handshake.c index 61fcef3b..d989fdb6 100644 --- a/lib/server-handshake.c +++ b/lib/server-handshake.c @@ -128,7 +128,7 @@ lws_extension_server_handshake(struct lws *wsi, char **p, int budget) * ask user code if it's OK to apply it on this * particular connection + protocol */ - m = wsi->vhost->protocols[0].callback(wsi, + m = (wsi->protocol->callback)(wsi, LWS_CALLBACK_CONFIRM_EXTENSION_OKAY, wsi->user_space, ext_name, 0); diff --git a/test-server/test-echo.c b/test-server/test-echo.c index df6e41e4..1b1115fc 100644 --- a/test-server/test-echo.c +++ b/test-server/test-echo.c @@ -168,11 +168,6 @@ do_rx: } break; #endif - case LWS_CALLBACK_CLIENT_CONFIRM_EXTENSION_SUPPORTED: - /* reject everything else except permessage-deflate */ - if (strcmp(in, "permessage-deflate")) - return 1; - break; default: break; @@ -203,11 +198,6 @@ static const struct lws_extension exts[] = { lws_extension_callback_pm_deflate, "permessage-deflate; client_no_context_takeover; client_max_window_bits" }, - { - "deflate-frame", - lws_extension_callback_pm_deflate, - "deflate_frame" - }, { NULL, NULL, NULL /* terminator */ } };