Give each SSE response its own header list

Merged
KL
18d ago
+45-12

Closes #3701.

handle_modern_request passed the module-level _SSE_HEADERS list straight into http.response.start. Middleware that appends to message["headers"] in place mutated that shared list, so every later SSE response carried all previously appended headers. Each SSE response now gets its own copy.

AI Disclaimer

This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.