WebBrokerAPI: Move on_connection_init.response policy processing before WebSocket upgrade in WebBrokerApi receiver
@senthuran16 is already working on this.
Since May 14, 2026.
- Dominant language
- Go
- Stars
- 71
- Forks
- 111
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 110
Description
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
- PR: https://github.com/wso2/api-platform/pull/1954
- Review comment: https://github.com/wso2/api-platform/pull/1954#discussion_r3239562627
- Related comments in: https://github.com/wso2/api-platform/pull/1944
Requested by
@senthuran16
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.