Skip to content

Fix Rust SDK WebSocket HA mode origin discovery#69

Merged
akuzni2 merged 4 commits into
mainfrom
patch/ha-mode-rust
Jun 2, 2026
Merged

Fix Rust SDK WebSocket HA mode origin discovery#69
akuzni2 merged 4 commits into
mainfrom
patch/ha-mode-rust

Conversation

@andrejrakic
Copy link
Copy Markdown
Collaborator

No description provided.

@andrejrakic andrejrakic requested a review from akuzni2 June 2, 2026 17:22
@andrejrakic andrejrakic marked this pull request as ready for review June 2, 2026 17:24
@andrejrakic andrejrakic requested a review from a team as a code owner June 2, 2026 17:24
Comment thread rust/crates/sdk/src/stream.rs Outdated
#[test]
fn test_parse_origins_from_header_with_braces() {
let result = parse_origins_from_header(
"{wss://ws1.dataengine.chain.link,wss://ws2.dataengine.chain.link}",
Copy link
Copy Markdown
Collaborator

@akuzni2 akuzni2 Jun 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for clarity of the actual protocol can we use the hint format {001,002} ?

let ws_url = format!("ws://{}", mock_server.address());

let ws_url = origins.join(",");
// Configure mock server to return N origins in HEAD response (all pointing to same mock).
Copy link
Copy Markdown
Collaborator

@akuzni2 akuzni2 Jun 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make sure that the Mock websocket server can capture + assert on the X-Cll-Origin header? So 2 separate asserts:

  • When HA mode is enabled on WS client: X-Cll-Origin header is present in request
  • When HA mode is enabled on WS client: WS Server sees separate origin requests i.e. 001, 002

akuzni2
akuzni2 previously approved these changes Jun 2, 2026
@akuzni2 akuzni2 merged commit d695598 into main Jun 2, 2026
10 checks passed
@andrejrakic andrejrakic deleted the patch/ha-mode-rust branch June 2, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants