Conversation
|
Some things that still appear a little off to me:
|
We can add more information to the docs, yep.
I haven't consider the option of not sending empty messages. From the client point of view, nothing changes, since the server will not send anything anyway... If you have a middleware, it may help to know this. As a first step, I think we need to add more details to the docs. Not much, just point out what happens on streaming. |
|
It seems there are more content types that can be excluded, according to Ameobea/rocket_async_compression@64a984d |
|
Happy to add more content-types on the constant if asked for. |
|
Would it be possible to make the behavior configurable (excluded types, and whether to flush after each chunk for streaming responses) as parameters when creating the middleware? The behavior proposed in #2753 makes a lot of sense if you expect relatively large SSE messages - we have e.g. an use case where we stream data for live charts over SSE, updates can reach 10-100 KB in size, which would profit significantly from compression. |
cc @vin