When streaming you are using Transfer-Encoding: chunked
, which makes Content-Length: -1
.
https://github.com/valyala/fasthttp/blob/master/header.go#L236
After activating bytesSent
on the logger, all SSE endpoints stop streaming.
It most likely caused by the logger attempting to read the full body length, consuming data before it is sent the client.
https://github.com/gofiber/fiber/blob/master/middleware/logger/tags.go#L91
Steps to reproduce the behavior:
${bytesSent}
as shown under https://docs.gofiber.io/api/middleware/logger#constantsSSE Should continue streaming.
2.40.1
// @see https://github.com/gofiber/recipes/tree/master/sse
// @see https://docs.gofiber.io/api/middleware/logger#constants