You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something (I suspect hyper) is adding a transfer-encoding: chunked header to responses generated using Axum's Sse type. As far as I can tell, the SSE responses are not being generated with chunked encoding, but rather raw SSE-style newline-delimited blocks. (chunked would normally imply a chunk size followed by a \r\n-delimited block, as far as I recall.)
Chromium tolerates this. Firefox mostly tolerates it, but it appears to break the display of event streams in the devtools, from what I can tell. This is how I noticed it.
The data there is definitely raw rather than chunked.
I'm filing this here because I'm not totally sure how the components interact -- is there e.g. a trait impl for Sse in Axum that I could adjust to stop this, or would I need to climb down into hyper? Happy to help but I'd need to be pointed at a starting point.
Sorry if I've missed something, thanks in advance.
The text was updated successfully, but these errors were encountered:
Bug Report
Version
Platform
Linux.
Description
Something (I suspect
hyper
) is adding atransfer-encoding: chunked
header to responses generated using Axum'sSse
type. As far as I can tell, the SSE responses are not being generated withchunked
encoding, but rather raw SSE-style newline-delimited blocks. (chunked
would normally imply a chunk size followed by a\r\n
-delimited block, as far as I recall.)Chromium tolerates this. Firefox mostly tolerates it, but it appears to break the display of event streams in the devtools, from what I can tell. This is how I noticed it.
You can verify this using the sse example:
and then from another terminal,
The data there is definitely raw rather than chunked.
I'm filing this here because I'm not totally sure how the components interact -- is there e.g. a trait impl for
Sse
in Axum that I could adjust to stop this, or would I need to climb down intohyper
? Happy to help but I'd need to be pointed at a starting point.Sorry if I've missed something, thanks in advance.
The text was updated successfully, but these errors were encountered: