diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-10-07 05:32:38 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-10-07 05:32:38 +0000 |
commit | 5df8f15c32420c03b2e763a649e6d829ede52113 (patch) | |
tree | f743c2841dd8b0be3edb7d600bde1baaf46ea557 /test/unit | |
parent | 629107d749748f661ddb73f146ab35836874cc9e (diff) | |
download | unicorn-5df8f15c32420c03b2e763a649e6d829ede52113.tar.gz |
The parser and request object become one and the same, since the parser lives for the lifetime of the request.
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/test_http_parser_ng.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/unit/test_http_parser_ng.rb b/test/unit/test_http_parser_ng.rb index 8e8c933..ec82b8a 100644 --- a/test/unit/test_http_parser_ng.rb +++ b/test/unit/test_http_parser_ng.rb @@ -388,6 +388,7 @@ class HttpParserNgTest < Test::Unit::TestCase "*" => { qs => "", pi => "" }, }.each do |uri,expect| assert_equal req, @parser.headers(req.clear, str % [ uri ]) + req = req.dup @parser.reset assert_equal uri, req["REQUEST_URI"], "REQUEST_URI mismatch" assert_equal expect[qs], req[qs], "#{qs} mismatch" @@ -412,6 +413,7 @@ class HttpParserNgTest < Test::Unit::TestCase "/1?a=b;c=d&e=f" => { qs => "a=b;c=d&e=f", pi => "/1" }, }.each do |uri,expect| assert_equal req, @parser.headers(req.clear, str % [ uri ]) + req = req.dup @parser.reset assert_equal uri, req["REQUEST_URI"], "REQUEST_URI mismatch" assert_equal "example.com", req["HTTP_HOST"], "Host: mismatch" |