Skip to content

Set host header consistently in STOMP relay CONNECT frames#36673

Open
tianhaocui wants to merge 1 commit intospring-projects:mainfrom
tianhaocui:fix-stomp-relay-host-header
Open

Set host header consistently in STOMP relay CONNECT frames#36673
tianhaocui wants to merge 1 commit intospring-projects:mainfrom
tianhaocui:fix-stomp-relay-host-header

Conversation

@tianhaocui
Copy link
Copy Markdown

Closes #36663

StompBrokerRelayMessageHandler only set the host header in CONNECT frames when virtualHost was explicitly configured. Per STOMP 1.2 specification, the host header is required on CONNECT frames.

This change falls back to relayHost (the TCP connection target) when virtualHost is not configured, ensuring the host header is always present in both system session and client session CONNECT frames.

StompBrokerRelayMessageHandler only set the host header in CONNECT
frames when virtualHost was explicitly configured. Per STOMP 1.2, the
host header is required on CONNECT frames.

Fall back to relayHost (the TCP connection target) when virtualHost is
not configured, ensuring the host header is always present in both
system session and client session CONNECT frames.

Closes spring-projects#36663

Signed-off-by: cuitianhao <54015884+tianhaocui@users.noreply.github.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged or decided on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consistently set host header in StompRelayMessageBrokerHandler

2 participants