From 250968080e4de575e1effb54ff3175e9051c7038 Mon Sep 17 00:00:00 2001 From: "Paolo \"Nusco\" Perrotta" Date: Tue, 26 Apr 2011 02:52:03 +0200 Subject: [PATCH] Removed corner case with HEAD method and Content-Length --- lib/sinatra/base.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) 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.