From 360ba90a9a50b5aabd1c65d51034c7ebe77e36ef Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 7 Jan 2011 10:20:24 -0800 Subject: 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/rainbows/response.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rainbows/response.rb b/lib/rainbows/response.rb index 11f270f..0212cdb 100644 --- a/lib/rainbows/response.rb +++ b/lib/rainbows/response.rb @@ -26,7 +26,7 @@ module Rainbows::Response "Status: #{status}\r\n" \ "Connection: #{alive ? KeepAlive : Close}\r\n" headers.each do |key, value| - next if %r{\A(?:X-Rainbows-|Date\z|Status\z|Connection\z)}i =~ key + next if %r{\A(?:X-Rainbows-|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