diff --git a/doc/connectivity/networking/api/http_server.rst b/doc/connectivity/networking/api/http_server.rst index 9514e5ab8f71227..b59d7d6896c140d 100644 --- a/doc/connectivity/networking/api/http_server.rst +++ b/doc/connectivity/networking/api/http_server.rst @@ -342,7 +342,7 @@ release it when done. static int ws_socket; static uint8_t ws_recv_buffer[1024]; - int ws_setup(int sock, void *user_data) + int ws_setup(int sock, struct http_request_ctx *request_ctx, void *user_data) { ws_socket = sock; return 0; diff --git a/doc/releases/migration-guide-4.1.rst b/doc/releases/migration-guide-4.1.rst index bd4ee35f388b964..ee968542283bec0 100644 --- a/doc/releases/migration-guide-4.1.rst +++ b/doc/releases/migration-guide-4.1.rst @@ -364,6 +364,11 @@ Networking rather than directly in the :c:struct:`http_client_ctx` to correctly handle concurrent requests on different HTTP/2 streams. +* The HTTP server public API function signature for the :c:type:`http_resource_websocket_cb_t` has + changed, a :c:struct:`http_request_ctx` parameter has been added. The application may use this to + access the request headers of the HTTP upgrade request, which may be useful in deciding whether + to accept or reject a websocket connection. + * The :kconfig:option:`CONFIG_NET_L2_OPENTHREAD` symbol no longer implies the :kconfig:option:`CONFIG_NVS` Kconfig option. Platforms using OpenThread must explicitly enable either the :kconfig:option:`CONFIG_NVS` or :kconfig:option:`CONFIG_ZMS` Kconfig option.