diff options
Diffstat (limited to 'test/test_response.rb')
-rw-r--r-- | test/test_response.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_response.rb b/test/test_response.rb index b68c1ef..c5e1084 100644 --- a/test/test_response.rb +++ b/test/test_response.rb @@ -37,6 +37,19 @@ class ResponseTest < Test::Unit::TestCase assert io.length > 0, "output didn't have data" end + def test_response_duplicate_header_squash + io = StringIO.new + resp = HttpResponse.new(io) + resp.start do |head,out| + head["Content-Length"] = 30 + head["Content-Length"] = 0 + end + + resp.finished + + assert_equal io.length, 95, "too much output" + end + def test_response_404 io = StringIO.new |