about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-12-17 06:51:58 +0000
committerEric Wong <normalperson@yhbt.net>2011-12-17 06:53:02 +0000
commitcda82b5ff44c8fcfb61315f822bbaefa3471d4fe (patch)
treef5a881d12c8f1ea7adc35a14ada1bfa262aa65c8 /test
parent68e8d3726542c549f291f82bdcb751d372c34597 (diff)
downloadunicorn-cda82b5ff44c8fcfb61315f822bbaefa3471d4fe.tar.gz
We need to be sure we don't barf on this header.
Diffstat (limited to 'test')
-rw-r--r--test/unit/test_http_parser_ng.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/test_http_parser_ng.rb b/test/unit/test_http_parser_ng.rb
index 2b2fe41..a5ee053 100644
--- a/test/unit/test_http_parser_ng.rb
+++ b/test/unit/test_http_parser_ng.rb
@@ -31,6 +31,14 @@ class HttpParserNgTest < Test::Unit::TestCase
     assert_raises(TypeError) { HttpParser.keepalive_requests = [] }
   end
 
+  def test_connection_TE
+    @parser.buf << "GET / HTTP/1.1\r\nHost: example.com\r\nConnection: TE\r\n"
+    @parser.buf << "TE: trailers\r\n\r\n"
+    assert_nothing_raised { @parser.parse }
+    assert @parser.keepalive?
+    assert @parser.next?
+  end
+
   def test_keepalive_requests_with_next?
     req = "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n".freeze
     expect = {