about summary refs log tree commit homepage
path: root/test/unit/test_request.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-03-29 19:01:24 -0700
committerEric Wong <normalperson@yhbt.net>2009-03-29 20:59:52 -0700
commit066226e97c1a08f927f62ae50d7e95a9ada4f303 (patch)
tree5f1fafb16ed79427a2df4c136fe9f31efc73ac98 /test/unit/test_request.rb
parentdf58b5249c3e17ee4fab448224e3f043a2444fa0 (diff)
downloadunicorn-066226e97c1a08f927f62ae50d7e95a9ada4f303.tar.gz
"HTTP_BODY" could conflict with a "Body:" HTTP header if there
ever is one.  Also, try to hide this body from the Rack
environment before @app is called since it is only used by
Unicorn internally.
Diffstat (limited to 'test/unit/test_request.rb')
-rw-r--r--test/unit/test_request.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/unit/test_request.rb b/test/unit/test_request.rb
index 37fbb14..7a4b92b 100644
--- a/test/unit/test_request.rb
+++ b/test/unit/test_request.rb
@@ -50,6 +50,7 @@ class RequestTest < Test::Unit::TestCase
       "abcde")
     res = env = nil
     assert_nothing_raised { env = @request.read(client) }
+    assert ! env.include?(:http_body)
     assert_nothing_raised { res = @lint.call(env) }
   end
 
@@ -71,6 +72,7 @@ class RequestTest < Test::Unit::TestCase
     assert_equal 0, client.sysseek(0)
     res = env = nil
     assert_nothing_raised { env = @request.read(client) }
+    assert ! env.include?(:http_body)
     assert_equal length, env['rack.input'].size
     count.times { assert_equal buf, env['rack.input'].read(bs) }
     assert_nil env['rack.input'].read(bs)