about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-06-17 08:59:02 +0000
committerEric Wong <normalperson@yhbt.net>2011-06-17 08:59:02 +0000
commitb08410facbccf96c67822a92888de0bc1910390e (patch)
treee88af92de8ae4ba5784b65d0c3d25625b89a834e /test
parent5f478f5a9a58f72c0a844258b8ee614bf24ea9f7 (diff)
downloadunicorn-b08410facbccf96c67822a92888de0bc1910390e.tar.gz
The random garbage generator may occasionally generate URIs that
are too long and cause the URI-specific error to be raised
instead of the generic parser error we recently introduced.

Follow-up-to: commit 742c4d77f179a757dbcb1fa350f9d75b757acfc7
Diffstat (limited to 'test')
-rw-r--r--test/unit/test_http_parser.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/unit/test_http_parser.rb b/test/unit/test_http_parser.rb
index 15e1745..27196db 100644
--- a/test/unit/test_http_parser.rb
+++ b/test/unit/test_http_parser.rb
@@ -769,7 +769,7 @@ class HttpParserTest < Test::Unit::TestCase
     # finally just that random garbage gets blocked all the time
     10.times do |c|
       get = "GET #{rand_data(1024, 1024+(c*1024), false)} #{rand_data(1024, 1024+(c*1024), false)}\r\n\r\n"
-      assert_raises Unicorn::HttpParserError do
+      assert_raises(Unicorn::HttpParserError,Unicorn::RequestURITooLongError) do
         parser.buf << get
         parser.parse
         parser.clear