This addresses #324 by using an adjustable timeout (100ms by default) when checking the body size to determine if the body should be compressed or when buffering chunks while sending the body. When the timeout expires, any buffered data is sent, regardless of if it meets the minimum chunk size.
This addresses #324 by using an adjustable timeout (100ms by default) when checking the body size to determine if the body should be compressed or when buffering chunks while sending the body. When the timeout expires, any buffered data is sent, regardless of if it meets the minimum chunk size.
For v3, the minimum chunk size param has been removed as such functionality is better within a stream implementation instead of being handled by the middleware. Cancellations also keep the implementation simpler. An untagged commit in byte-stream is required, https://github.com/amphp/byte-stream/commit/092e9316f8b24edd620a1515ee01e487080f16ad. See https://github.com/amphp/http-server/commit/879a0f36504d348846956c08fe1416c338a77262 for the v3 implementation.