Skip to content

Add Connection: keep-alive to SSE default headers - #150

Merged
dadhi merged 3 commits into
mainfrom
copilot/ensure-connection-keep-alive-sse
Aug 5, 2026
Merged

Add Connection: keep-alive to SSE default headers#150
dadhi merged 3 commits into
mainfrom
copilot/ensure-connection-keep-alive-sse

Conversation

Copilot AI commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

SSE fetch requests were missing Connection: keep-alive, which is required for persistent streaming connections to work reliably across proxies and load balancers.

Changes

  • dmax.js: Added H_CONNECTION = 'connection' constant; included connection: keep-alive in ACT_HS_SSE alongside existing accept, cache-control, and pragma headers
// Before
const ACT_HS_SSE = Object.freeze({ [H_ACCEPT]: 'text/event-stream', [H_CACHE_CONTROL]: 'no-cache', [H_PRAGMA]: 'no-cache' })

// After
const ACT_HS_SSE = Object.freeze({ [H_ACCEPT]: 'text/event-stream', [H_CACHE_CONTROL]: 'no-cache', [H_CONNECTION]: 'keep-alive', [H_PRAGMA]: 'no-cache' })
  • tests/dmax.size.limits.json: Updated byte limit to reflect the addtion

Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com>
Copilot AI changed the title [WIP] Ensure we are using Connection: keep-alive for sse by default Add Connection: keep-alive to SSE default headers Aug 4, 2026
Copilot AI requested a review from dadhi August 4, 2026 21:53
Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com>
Copilot AI requested a review from dadhi August 4, 2026 22:16
@dadhi
dadhi marked this pull request as ready for review August 5, 2026 09:17
@dadhi
dadhi merged commit d80153b into main Aug 5, 2026
1 check passed
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.

Ensure we are using Connection: keep-alive for sse by default

2 participants