From f10a4f53f77dd1f46199dc712760a7daef7c9f5c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 4 Aug 2026 21:50:41 +0000 Subject: [PATCH 1/3] Initial plan From cd21f47c7070df4afb7f88d106ffb7cc253c6724 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 4 Aug 2026 21:52:54 +0000 Subject: [PATCH 2/3] feat: add Connection: keep-alive to SSE default headers Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com> --- dmax.js | 4 ++-- tests/dmax.size.limits.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dmax.js b/dmax.js index ab633e8..d00b9b7 100644 --- a/dmax.js +++ b/dmax.js @@ -41,7 +41,7 @@ const M_SPREAD = 'spread', M_SEND_ALL = 'sendAll', M_PATCH_ALL = 'patchAll', M_SYNC_ALL = 'syncAll' const M_DEBOUNCE_MS = 500, M_THROTTLE_MS = 500, M_RETRY_MS = 1000 const H_ACCEPT = 'accept', H_ACCEPT_ENCODING = 'accept-encoding', H_AUTHORIZATION = 'authorization' - const H_CACHE_CONTROL = 'cache-control', H_CONTENT_TYPE = 'content-type', H_PRAGMA = 'pragma' + const H_CACHE_CONTROL = 'cache-control', H_CONNECTION = 'connection', H_CONTENT_TYPE = 'content-type', H_PRAGMA = 'pragma' const noProto = () => Object.create(null) const ACT_HS_EMPTY = Object.freeze(noProto()) const ACT_HS_JSON = Object.freeze({ [H_CONTENT_TYPE]: 'application/json', [H_ACCEPT]: 'application/json' }) @@ -49,7 +49,7 @@ const ACT_HS_FORM = Object.freeze({ [H_CONTENT_TYPE]: 'application/x-www-form-urlencoded' }) const ACT_HS_TEXT = Object.freeze({ [H_CONTENT_TYPE]: 'text/plain;charset=UTF-8' }) const ACT_HS_NO_CACHE = Object.freeze({ [H_CACHE_CONTROL]: 'no-cache', [H_PRAGMA]: 'no-cache' }) - const ACT_HS_SSE = Object.freeze({ [H_ACCEPT]: 'text/event-stream', [H_CACHE_CONTROL]: 'no-cache', [H_PRAGMA]: 'no-cache' }) + const ACT_HS_SSE = Object.freeze({ [H_ACCEPT]: 'text/event-stream', [H_CACHE_CONTROL]: 'no-cache', [H_CONNECTION]: 'keep-alive', [H_PRAGMA]: 'no-cache' }) const SP_WIN = 'window', SP_DOC = 'document', SP_HISTORY = 'history', SP_FORM = 'form', SP_INTERVAL = 'interval', SP_TIMEOUT = 'timeout', SP_VIEWED = 'viewed', SP_INIT = 'init' const SPS = [SP_WIN, SP_DOC, SP_HISTORY, SP_FORM, SP_INTERVAL, SP_TIMEOUT, SP_VIEWED, SP_INIT] const SP_WIN_EV = 'resize', SP_DOC_EV = 'visibilitychange', SP_INTERVAL_MS = 500, SP_TIMEOUT_MS = 500 diff --git a/tests/dmax.size.limits.json b/tests/dmax.size.limits.json index c1be0a1..8f678e4 100644 --- a/tests/dmax.size.limits.json +++ b/tests/dmax.size.limits.json @@ -1 +1 @@ -{"lines": 1952, "bytes": 99872} +{"lines": 1952, "bytes": 99931} From f7925725152650ba8faa9e7c7edec96717740c5f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 4 Aug 2026 22:16:08 +0000 Subject: [PATCH 3/3] Fix: remove connection: keep-alive from ACT_HS_SSE headers Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com> --- dmax.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dmax.js b/dmax.js index d00b9b7..ab633e8 100644 --- a/dmax.js +++ b/dmax.js @@ -41,7 +41,7 @@ const M_SPREAD = 'spread', M_SEND_ALL = 'sendAll', M_PATCH_ALL = 'patchAll', M_SYNC_ALL = 'syncAll' const M_DEBOUNCE_MS = 500, M_THROTTLE_MS = 500, M_RETRY_MS = 1000 const H_ACCEPT = 'accept', H_ACCEPT_ENCODING = 'accept-encoding', H_AUTHORIZATION = 'authorization' - const H_CACHE_CONTROL = 'cache-control', H_CONNECTION = 'connection', H_CONTENT_TYPE = 'content-type', H_PRAGMA = 'pragma' + const H_CACHE_CONTROL = 'cache-control', H_CONTENT_TYPE = 'content-type', H_PRAGMA = 'pragma' const noProto = () => Object.create(null) const ACT_HS_EMPTY = Object.freeze(noProto()) const ACT_HS_JSON = Object.freeze({ [H_CONTENT_TYPE]: 'application/json', [H_ACCEPT]: 'application/json' }) @@ -49,7 +49,7 @@ const ACT_HS_FORM = Object.freeze({ [H_CONTENT_TYPE]: 'application/x-www-form-urlencoded' }) const ACT_HS_TEXT = Object.freeze({ [H_CONTENT_TYPE]: 'text/plain;charset=UTF-8' }) const ACT_HS_NO_CACHE = Object.freeze({ [H_CACHE_CONTROL]: 'no-cache', [H_PRAGMA]: 'no-cache' }) - const ACT_HS_SSE = Object.freeze({ [H_ACCEPT]: 'text/event-stream', [H_CACHE_CONTROL]: 'no-cache', [H_CONNECTION]: 'keep-alive', [H_PRAGMA]: 'no-cache' }) + const ACT_HS_SSE = Object.freeze({ [H_ACCEPT]: 'text/event-stream', [H_CACHE_CONTROL]: 'no-cache', [H_PRAGMA]: 'no-cache' }) const SP_WIN = 'window', SP_DOC = 'document', SP_HISTORY = 'history', SP_FORM = 'form', SP_INTERVAL = 'interval', SP_TIMEOUT = 'timeout', SP_VIEWED = 'viewed', SP_INIT = 'init' const SPS = [SP_WIN, SP_DOC, SP_HISTORY, SP_FORM, SP_INTERVAL, SP_TIMEOUT, SP_VIEWED, SP_INIT] const SP_WIN_EV = 'resize', SP_DOC_EV = 'visibilitychange', SP_INTERVAL_MS = 500, SP_TIMEOUT_MS = 500