Repository navigation
fix: do not set Connection header on SSE responses - #2117
Merged
Merged
Conversation
Contributor
|
Do not commit with |
patriknw
reviewed
Oct 22, 2026
Contributor
|
This is in line with the standards:
|
johanandren
reviewed
Oct 23, 2026
johanandren
left a comment
Contributor
There was a problem hiding this comment.
Fix is fine, some smaller things to clean up
The Connection header is not allowed for HTTP/2. Akka HTTP drops it and logs a warning for every SSE response served over HTTP/2.
max8github
force-pushed
the
fix-sse-connection-header
branch
from
October 23, 2026 09:15
c3ec0ca to
fc52887
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HttpResponses.serverSentEvents*setConnection: keep-aliveon every SSE response. TheConnectionheader is not allowed for HTTP/2, so Akka HTTP ignores it and logs this each time an SSE endpoint is served over HTTP/2:HTTP/1.1 keeps connections alive by default, so the header is not needed. This removes it.
Reproduced with a minimal service on SDK 3.5.16: an SSE endpoint called over HTTP/2 logged the warning; a plain endpoint and SSE over HTTP/1.1 did not. The stream still delivered all events.