Skip to content

esp_http_server: close WebSocket sessions on parse failures (IDFGH-17706)#18646

Open
dhimasardinata wants to merge 1 commit into
espressif:masterfrom
dhimasardinata:fix/http-server-ws-close-on-parse-error
Open

esp_http_server: close WebSocket sessions on parse failures (IDFGH-17706)#18646
dhimasardinata wants to merge 1 commit into
espressif:masterfrom
dhimasardinata:fix/http-server-ws-close-on-parse-error

Conversation

@dhimasardinata
Copy link
Copy Markdown

Summary

  • Mark WebSocket sessions for closure when httpd_ws_recv_frame() hits unrecoverable receive or frame parsing errors.
  • Cover the unmasked client frame path with a Unity regression test.
  • Document that socket/framing errors mark the WebSocket session for closure.

Verification

  • idf.py -C components/esp_http_server/test_apps set-target esp32 build
  • idf.py -C components/esp_http_server/test_apps size-components
  • python tools/ci/check_public_headers.py --only-dir components/esp_http_server/include --jobs 4
  • git diff --check

Refs #18563

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 24, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot changed the title esp_http_server: close WebSocket sessions on parse failures esp_http_server: close WebSocket sessions on parse failures (IDFGH-17706) May 24, 2026
@espressif-bot espressif-bot added the Status: Opened Issue is new label May 24, 2026
@mahavirj mahavirj requested a review from Ashish285 May 25, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Opened Issue is new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants