From ec400a537a0947796e108f3593721289661b49dc Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 7 Jan 2011 10:14:46 -0800 Subject: http_response: do not skip Status header set by app Rack::Lint already stops apps from using it. If a developer insists on it, then users who inspect their HTTP headers can point and laugh at them for not using Rack::Lint! --- lib/unicorn/http_response.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/unicorn/http_response.rb b/lib/unicorn/http_response.rb index 62b3ee9..03d3179 100644 --- a/lib/unicorn/http_response.rb +++ b/lib/unicorn/http_response.rb @@ -26,7 +26,7 @@ module Unicorn::HttpResponse "Status: #{status}\r\n" \ "Connection: close\r\n" headers.each do |key, value| - next if %r{\A(?:Date\z|Status\z|Connection\z)}i =~ key + next if %r{\A(?:Date\z|Connection\z)}i =~ key if value =~ /\n/ # avoiding blank, key-only cookies with /\n+/ buf << value.split(/\n+/).map! { |v| "#{key}: #{v}\r\n" }.join -- cgit v1.2.3-24-ge0c7