Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

Commit

Permalink
test_http_parser: fix for URI too long errors (again)
Browse files Browse the repository at this point in the history
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 742c4d7
  • Loading branch information
Eric Wong committed Jun 15, 2011
1 parent a7d9eb0 commit e9e7a1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/unit/test_http_parser.rb
Expand Up @@ -761,7 +761,7 @@ def test_horrible_queries
get = "GET /#{rand_data(10,120)} HTTP/1.1\r\n"
get << "X-Test: test\r\n" * (80 * 1024)
parser.buf << get
assert_raises Unicorn::HttpParserError do
assert_raises(Unicorn::HttpParserError,Unicorn::RequestURITooLongError) do
parser.parse
end
parser.clear
Expand Down

0 comments on commit e9e7a1c

Please sign in to comment.