about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-11-16 04:18:24 +0000
committerEric Wong <e@80x24.org>2014-11-16 04:19:04 +0000
commit36b3d5ab9779757996191ca9271d1336ec5303d7 (patch)
tree1394d1c20d0d2f930f575e844b9297301c58a992 /lib
parent0f2b4369192946ecf8ab22b1c2eacd92ff595312 (diff)
downloadyahns-36b3d5ab9779757996191ca9271d1336ec5303d7.tar.gz
HTTP headers are compared case-insensitively, so we must filter out
the Date header case-insensitively.  Found via casual code
inspection, I doubt anybody sets a Date header in Rack apps.
Diffstat (limited to 'lib')
-rw-r--r--lib/yahns/http_response.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/yahns/http_response.rb b/lib/yahns/http_response.rb
index 8965fd0..33ae93e 100644
--- a/lib/yahns/http_response.rb
+++ b/lib/yahns/http_response.rb
@@ -143,7 +143,7 @@ module Yahns::HttpResponse # :nodoc:
       buf = "#{response_start}#{status}\r\nDate: #{httpdate}\r\n"
       headers.each do |key, value|
         case key
-        when %r{\ADate\z}
+        when %r{\ADate\z}i
           next
         when %r{\AContent-Range\z}i
           if %r{\Abytes (\d+)-(\d+)/\d+\z} =~ value