-
Notifications
You must be signed in to change notification settings - Fork 175
feat(websocket): add WEBSOCKET_EVENT_HEADER_RECEIVED (IDFGH-16539) #827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(websocket): add WEBSOCKET_EVENT_HEADER_RECEIVED (IDFGH-16539) #827
Conversation
6be5991 to
f96e373
Compare
f96e373 to
90cef3a
Compare
|
we merged the dependencies for this PR, (espressif/esp-idf#16199, espressif/esp-idf#16119). then guard all the codes using: Thanks! |
90cef3a to
3a9529b
Compare
It is done and ready for your review. @glmfe , should ESP-IDF keep both APIs (including 1d71a9e8114fba8d22e96694 API), or only support the per-header callback one going forward? I think once 6.0.0 is released, we'll need to support everything in it going forward. |
Thanks for the updates, LGTM about the other API, my guess is that we are going to deprecate it later on since we already entered the code freeze for IDF 6.0. But I'll have to allign internally |
3a9529b to
57d48bb
Compare
|
we just merged a fix for the pipeline issue, please, rebase your brach. BR |
Send a new event for each HTTP header-line received. Depends on espressif/esp-idf#16119 Closes espressif#715
57d48bb to
b13064d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
1.6.0 Features - add WEBSOCKET_EVENT_HEADER_RECEIVED (espressif#827) (18f0d02, espressif#715) - enhance example with docs, pytest setup, and standalone test server - Add comprehensive README with TOC and quick start - Add pytest setup and certificate generation scripts - Add standalone WebSocket test server with TLS support - Add troubleshooting and multiple testing approaches (cad527d) - Add websocket HTTP redirect (ce1560a) Bug Fixes - remove redundant timeout check in client task loop (1e83bee) - fix PING timing - enable periodic PING during active traffic (7f42432) - Update linux build docs on required libs (e52a575) - clean up component dependencies - Remove unused 'json', 'nvs_flash', 'esp_stubs', dependency from Linux build configuration - Add cJSON dependency to target example's idf_component.yml (d665e6f) - fix relying on asprintf() to NULL strp on failure (54eb002) - Update Remaining Websocket Echo Server (espressif#893) (18faeb3) - avoid long stopping time when waiting to auto-reconnect (2432e41) - Update Websocket Echo Server (94bd5b0) Updated - ci(common): Update test component dir for IDFv6.0 (18418c8)
Description
Send a new event for each HTTP header-line received, so that the caller may extract interesting headers and cookies. In my case, this is needed for supporting F5 and Amazon ALB cookie-based load-balancers.
Related
Depends on espressif/esp-idf#16119
Closes #715
Testing
Confirmed I can print out the needed header-lines.
Checklist
Before submitting a Pull Request, please ensure the following:
Note
Emit
WEBSOCKET_EVENT_HEADER_RECEIVEDfor each pre-upgrade HTTP header via a transport header callback (IDF ≥ 6), and update examples to handle it.websocket_header_hook()and, when supported, pass.header_hookand.header_user_contexttoesp_transport_ws_config_t, dispatchingWEBSOCKET_EVENT_HEADER_RECEIVEDfor each header line.WS_TRANSPORT_HEADER_CALLBACK_SUPPORT(enabled forESP_IDF_VERSION >= 6.0.0).WEBSOCKET_EVENT_HEADER_RECEIVEDtoesp_websocket_event_id_t(behind the feature flag).examples/linuxandexamples/targetevent handlers to logWEBSOCKET_EVENT_HEADER_RECEIVEDwhen available.Written by Cursor Bugbot for commit 3a9529b. This will update automatically on new commits. Configure here.