Cleanup ameba warnings (#551)

This commit is contained in:
Sijawusz Pur Rahnama 2019-08-30 13:32:23 +02:00 committed by Serdar Dogruyol
parent 740cb188a9
commit c893172fbf
5 changed files with 7 additions and 36 deletions

View file

@ -1,6 +1,7 @@
class HTTP::Server::Response
class Output
def close
# ameba:disable Style/NegatedConditionsInUnless
unless response.wrote_headers? && !response.headers.has_key?("Content-Range")
response.content_length = @out_count
end

View file

@ -4,6 +4,7 @@
module Kemal
class StaticFileHandler < HTTP::StaticFileHandler
# ameba:disable Metrics/CyclomaticComplexity
def call(context : HTTP::Server::Context)
return call_next(context) if context.request.path.not_nil! == "/"