diff --git a/lib/sinatra/base.rb b/lib/sinatra/base.rb index 2e8d6984c9..79871b5440 100644 --- a/lib/sinatra/base.rb +++ b/lib/sinatra/base.rb @@ -646,16 +646,7 @@ def call!(env) # :nodoc: end end - status, header, body = @response.finish - - # On HEAD requests, if the Content-Length is "0", assume - # it was calculated erroneously for a manual HEAD response - # and remove it entirely. - if @env['REQUEST_METHOD'] == 'HEAD' - header.delete('Content-Length') if header['Content-Length'] == '0' - end - - [status, header, body] + @response.finish end # Access settings defined with Base.set.