diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-01-07 10:10:20 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-01-07 10:20:06 -0800 |
commit | c162bd4d620bc1421f104d9d0dfba21fb9b43068 (patch) | |
tree | 4bf7f6f81762d5b2fcbb61dc363289e3b9e3fd37 /lib/rainbows/response.rb | |
parent | b788a0f1eedfb358f9d57f40cec6ba0960dea3fe (diff) | |
download | rainbows-c162bd4d620bc1421f104d9d0dfba21fb9b43068.tar.gz |
We already set a Status: header by default for compatibility with some existing, broken libraries out there.
Diffstat (limited to 'lib/rainbows/response.rb')
-rw-r--r-- | lib/rainbows/response.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |