Skip to content

Commit 1aa2fba

Browse files
Fix SSE connection close header for Go HTTP clients
Change SSE response header from connection: keep-alive to connection: close. Go HTTP clients (opencode) wait for the server to close the connection, causing hangs. Python SDK was unaffected because it closes after seeing data: [DONE]. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent af94172 commit 1aa2fba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/forge/proxy/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ async def _send_sse(send: Any, chunks: list[bytes]) -> None:
286286
"headers": [
287287
[b"content-type", b"text/event-stream"],
288288
[b"cache-control", b"no-cache"],
289-
[b"connection", b"keep-alive"],
289+
[b"connection", b"close"],
290290
],
291291
})
292292
for chunk in chunks:

0 commit comments

Comments
 (0)