From 1a1335fe5b1894848b48a233c9f6a80634329b40 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 18 Oct 2009 09:35:59 -0700 Subject: http_response: filter out X-Rainbows-* headers We'll be using some custom headers to craft responses --- lib/rainbows/http_response.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/rainbows/http_response.rb') diff --git a/lib/rainbows/http_response.rb b/lib/rainbows/http_response.rb index ebaa4e7..6617666 100644 --- a/lib/rainbows/http_response.rb +++ b/lib/rainbows/http_response.rb @@ -13,6 +13,7 @@ module Rainbows status = CODES[status.to_i] || status headers.each do |key, value| + next if %r{\AX-Rainbows-}i =~ key next if SKIP.include?(key.downcase) if value =~ /\n/ out.concat(value.split(/\n/).map! { |v| "#{key}: #{v}\r\n" }) -- cgit v1.2.3-24-ge0c7