15 lines
367 B
Crystal
15 lines
367 B
Crystal
class HTTP::Server::Response
|
|
class Output
|
|
def close
|
|
# ameba:disable Style/NegatedConditionsInUnless
|
|
unless response.wrote_headers? && !response.headers.has_key?("Content-Range") && !response.headers.has_key?("Content-Length")
|
|
response.content_length = @out_count
|
|
end
|
|
|
|
ensure_headers_written
|
|
|
|
previous_def
|
|
end
|
|
end
|
|
end
|