From f203eaae7ea84de9e974ea5dac2df97d664d8e61 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 17 Aug 2014 02:33:55 +0000 Subject: http_response: remove Status: header Whatever compatibility reasons which existed in 2009 likely do not exist now. Other servers (e.g. thin, puma) seem to work alright without it, so there's no reason to waste precious bytes. --- lib/unicorn/http_response.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/unicorn/http_response.rb') diff --git a/lib/unicorn/http_response.rb b/lib/unicorn/http_response.rb index 083951c..cc027c5 100644 --- a/lib/unicorn/http_response.rb +++ b/lib/unicorn/http_response.rb @@ -24,14 +24,12 @@ module Unicorn::HttpResponse # writes the rack_response to socket as an HTTP response def http_response_write(socket, status, headers, body, response_start_sent=false) - status = CODES[status.to_i] || status hijack = nil http_response_start = response_start_sent ? '' : 'HTTP/1.1 ' if headers - buf = "#{http_response_start}#{status}\r\n" \ + buf = "#{http_response_start}#{CODES[status.to_i] || status}\r\n" \ "Date: #{httpdate}\r\n" \ - "Status: #{status}\r\n" \ "Connection: close\r\n" headers.each do |key, value| case key -- cgit v1.2.3-24-ge0c7