-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compression is incompatible with streaming responses #324
Comments
Sorry for the delay in responding – though it was clear you figured this out quickly, probably why none of us felt the need.
|
The best solution would actually be to buffer only the message. I think the current behavior is far from optimal. FYI I was looking into that because I was trying to build a mercure.rock implementation on my own. |
I missed the obvious here and @kelunik pointed it out in chat. I guess we should change the behavior of |
We also have the stream threshold setting that gets in the way of event streaming. Looks like it would be advantageous to add an event-stream example too. |
Completely removed chunkSize param in for v3. Related to #324.
Completely removed chunkSize param in for v3. Related to #324.
Completely removed chunkSize param in for v3. Related to #324.
Completely removed chunkSize param in for v3. Related to #324.
In the merged change, bufferTimeout is a constructor parameter for CompressionMiddleware, but the property is not set in the constructor. This leads to bufferTimout always being null. I have prepared the (single-line change) in a PR here: #339 |
I tried to make a super-simple SSE server (code below). It was just not working until I disabled the compression. Since I assume streamed responses should work with compression enabled, I open an issue about it.
Using this works:
The text was updated successfully, but these errors were encountered: