From c162bd4d620bc1421f104d9d0dfba21fb9b43068 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 7 Jan 2011 10:10:20 -0800 Subject: response: fix skipping of Status: header from app We already set a Status: header by default for compatibility with some existing, broken libraries out there. --- lib/rainbows/response.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rainbows/response.rb') diff --git a/lib/rainbows/response.rb b/lib/rainbows/response.rb index 111813f..11f270f 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|Status\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