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
Describe the bug
When the Content-Length response header is set, the server cannot interrupt a stream if the number of consumed bytes does not match the Content-Length value. Even if the stream fails, it remains uninterruptible.
What is the problem?
The connection hangs indefinitely, with no way to close it on the server side, causing resource leaks. Only the client can terminate the connection.
I think, the server should be able to close a hanging connection if the stream is failed or terminated early, regardless of the Content-Length header.
How to reproduce?
Set the Content-Length response header.
Attempt to timeout or fail a stream using interruptWhen or ZIO.fail(err) and ensure the number of consumed bytes is less than the Content-Length response header value.
Maybe you can provide code to reproduce the problem?
The text was updated successfully, but these errors were encountered:
pentonzxc
changed the title
[BUG] Stream response interruption or failure doesn't work when the Content-Length header is set
[BUG] tapir-vertx-server-zio: Stream response interruption or failure doesn't work when the Content-Length header is set
Dec 17, 2024
Tapir version: 1.11.10
Scala version: 2.13.15
Describe the bug
When the Content-Length response header is set, the server cannot interrupt a stream if the number of consumed bytes does not match the Content-Length value. Even if the stream fails, it remains uninterruptible.
What is the problem?
The connection hangs indefinitely, with no way to close it on the server side, causing resource leaks. Only the client can terminate the connection.
I think, the server should be able to close a hanging connection if the stream is failed or terminated early, regardless of the Content-Length header.
How to reproduce?
Maybe you can provide code to reproduce the problem?
I've created a repository demonstrating the issue:
https://github.com/pentonzxc/tapir-vertx-server-zio-bug-uncancellable-stream.
The text was updated successfully, but these errors were encountered: