Hi list, This series adds a new SPOE event, "on-frontend-tcp-request-done", which fires on the frontend after the "tcp-request content" rules have been evaluated but before the "use_backend" switching rules. This lets an SPOA agent inspect the buffered request and influence backend selection, for example by setting a variable that a "use_backend" rule then reads.
The motivating use case is SNI-based routing in TCP mode: waiting for the request via "tcp-request inspect-delay" + "tcp-request content", handing req.ssl_sni to an agent, and letting the agent's reply pick the backend. The event is hooked on the AN_REQ_SWITCHING_RULES analyzer through the filter pre-analyze callback, so it runs after tcp_inspect_request() and before process_switching_rules(). Its sample-fetch validity checkpoint is SMP_VAL_FE_SET_BCK, matching the point at which use_backend rules are evaluated. Like the other frontend events, it is only accepted for SPOE filters declared in a frontend/listen section. Patch 1 implements the event, patch 2 documents it, and patch 3 adds a functional reg-test driven by a minimal stdlib-only SPOA mock, avoiding external dependencies. The patches also resolve GH issue https://github.com/haproxy/haproxy/issues/3220. Best, Benedict and Alexander
0001-MEDIUM-spoe-add-the-on-frontend-tcp-request-done-eve.patch
Description: 0001-MEDIUM-spoe-add-the-on-frontend-tcp-request-done-eve.patch
0002-DOC-spoe-document-the-on-frontend-tcp-request-done-e.patch
Description: 0002-DOC-spoe-document-the-on-frontend-tcp-request-done-e.patch
0003-REGTESTS-spoe-test-on-frontend-tcp-request-done-back.patch
Description: 0003-REGTESTS-spoe-test-on-frontend-tcp-request-done-back.patch

