Summary
In event-gateway/gateway-runtime/internal/connectors/receiver/websocket/broker_api_connector.go, the on_connection_init.response policy is currently applied after the WebSocket handshake (upgrader.Upgrade), and its output headers are discarded. This means any headers set by the response policy cannot influence the WebSocket handshake.
Expected Behavior
ProcessConnectionInitResponse should be called before upgrader.Upgrade, and the resulting headers from the processed message should be passed as the third argument to upgrader.Upgrade (instead of nil), so that handshake headers reflect policy output.
References
Requested by
@senthuran16
Summary
In
event-gateway/gateway-runtime/internal/connectors/receiver/websocket/broker_api_connector.go, theon_connection_init.responsepolicy is currently applied after the WebSocket handshake (upgrader.Upgrade), and its output headers are discarded. This means any headers set by the response policy cannot influence the WebSocket handshake.Expected Behavior
ProcessConnectionInitResponseshould be called beforeupgrader.Upgrade, and the resulting headers from the processed message should be passed as the third argument toupgrader.Upgrade(instead ofnil), so that handshake headers reflect policy output.References
Requested by
@senthuran16