-
Notifications
You must be signed in to change notification settings - Fork 171
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
base: master
Are you sure you want to change the base?
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 |
Send a new event for each HTTP header-line received. Depends on espressif/esp-idf#16119 Closes espressif#715
3a9529b
to
57d48bb
Compare
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_RECEIVED
for 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_hook
and.header_user_context
toesp_transport_ws_config_t
, dispatchingWEBSOCKET_EVENT_HEADER_RECEIVED
for each header line.WS_TRANSPORT_HEADER_CALLBACK_SUPPORT
(enabled forESP_IDF_VERSION >= 6.0.0
).WEBSOCKET_EVENT_HEADER_RECEIVED
toesp_websocket_event_id_t
(behind the feature flag).examples/linux
andexamples/target
event handlers to logWEBSOCKET_EVENT_HEADER_RECEIVED
when available.Written by Cursor Bugbot for commit 3a9529b. This will update automatically on new commits. Configure here.