about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-12-16 04:26:54 +0000
committerzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-12-16 04:26:54 +0000
commit0d2428d0f4b82e1872f9b3152145f7e2ad399649 (patch)
tree9e7cb83b438d759f2c51e2f31de07c1ae0c34891 /test
parent4a3f4095b6f2cb60cb1c798af886dc9bb47d8d66 (diff)
downloadunicorn-0d2428d0f4b82e1872f9b3152145f7e2ad399649.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@470 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'test')
-rw-r--r--test/test_response.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/test_response.rb b/test/test_response.rb
index c5e1084..584b28f 100644
--- a/test/test_response.rb
+++ b/test/test_response.rb
@@ -50,6 +50,24 @@ class ResponseTest < Test::Unit::TestCase
     assert_equal io.length, 95, "too much output"
   end
 
+
+  def test_response_some_duplicates_allowed
+    allowed_duplicates = ["Set-Cookie", "Set-Cookie2", "Warning", "WWW-Authenticate"]
+    io = StringIO.new
+    resp = HttpResponse.new(io)
+    resp.start do |head,out|
+      allowed_duplicates.each do |dup|
+        10.times do |i|
+          head[dup] = i
+        end
+      end
+    end
+
+    resp.finished
+
+    assert_equal io.length, 734, "wrong amount of output"
+  end
+
   def test_response_404
     io = StringIO.new