diff --git a/src/kemal/ext/response.cr b/src/kemal/ext/response.cr index 6fd4c01..1d11dd1 100644 --- a/src/kemal/ext/response.cr +++ b/src/kemal/ext/response.cr @@ -2,7 +2,7 @@ class HTTP::Server::Response class Output def close # ameba:disable Style/NegatedConditionsInUnless - unless response.wrote_headers? && !response.headers.has_key?("Content-Range") + if !response.wrote_headers? && !response.headers.has_key?("Content-Range") && !response.headers.has_key?("Content-Length") response.content_length = @out_count end