Skip to content

fix: improve SSE stream response handling and add fasthttp support (#888)#1014

Open
zhouyusd wants to merge 3 commits intodanielgtaylor:mainfrom
zhouyusd:fix-fasthttp-sse
Open

fix: improve SSE stream response handling and add fasthttp support (#888)#1014
zhouyusd wants to merge 3 commits intodanielgtaylor:mainfrom
zhouyusd:fix-fasthttp-sse

Conversation

@zhouyusd
Copy link
Copy Markdown

@zhouyusd zhouyusd commented Apr 14, 2026

Fix #888

Copilot AI review requested due to automatic review settings April 14, 2026 19:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves Server-Sent Events (SSE) streaming response handling by refactoring message sending and adding a fasthttp/Fiber-specific streaming implementation.

Changes:

  • Refactors SSE message writing into a reusable internal send(...) helper that accepts writer/encoder/flusher/deadliner dependencies.
  • Adds a fasthttp (*fasthttp.RequestCtx) streaming path using SetBodyStreamWriter to support Fiber/fasthttp response streaming.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sse/sse.go
Comment thread sse/sse.go
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.

SSE: deadline failed to flush

2 participants