about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-09-02 23:49:05 -0700
committerEric Wong <normalperson@yhbt.net>2009-09-02 23:49:05 -0700
commitbd0599c4ac91d95cae1f34df3ae99c92f3225391 (patch)
tree869c29ea8bc00ada5b38813af1f32607b6bfd967 /test
parente75de4b28b19e9ac79083bba4b55bcb4c93b207d (diff)
downloadunicorn-bd0599c4ac91d95cae1f34df3ae99c92f3225391.tar.gz
And it'll default to HTTP/0.9 if HTTP_VERSION is not specified
(as version-less HTTP requests imply HTTP/0.9.
Diffstat (limited to 'test')
-rw-r--r--test/unit/test_http_parser.rb6
-rw-r--r--test/unit/test_http_parser_ng.rb2
2 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/test_http_parser.rb b/test/unit/test_http_parser.rb
index 5430614..5ba0239 100644
--- a/test/unit/test_http_parser.rb
+++ b/test/unit/test_http_parser.rb
@@ -260,7 +260,7 @@ class HttpParserTest < Test::Unit::TestCase
     assert_equal 'HTTP/1.0', req['HTTP_VERSION']
     assert_nil parser.headers(req, http << "\r")
     assert_equal req, parser.headers(req, http << "\n")
-    assert_equal 'HTTP/1.1', req['SERVER_PROTOCOL']
+    assert_equal 'HTTP/1.0', req['SERVER_PROTOCOL']
     assert_nil req['FRAGMENT']
     assert_equal '', req['QUERY_STRING']
     assert_equal "", http
@@ -367,7 +367,7 @@ class HttpParserTest < Test::Unit::TestCase
     assert_equal '/', req['REQUEST_URI']
     assert_equal 'PUT', req['REQUEST_METHOD']
     assert_equal 'HTTP/1.0', req['HTTP_VERSION']
-    assert_equal 'HTTP/1.1', req['SERVER_PROTOCOL']
+    assert_equal 'HTTP/1.0', req['SERVER_PROTOCOL']
     assert_equal "abcde", http
     assert ! parser.keepalive? # TODO: read HTTP/1.2 when it's final
   end
@@ -381,7 +381,7 @@ class HttpParserTest < Test::Unit::TestCase
     assert_equal '/l', req['REQUEST_URI']
     assert_equal 'PUT', req['REQUEST_METHOD']
     assert_equal 'HTTP/1.0', req['HTTP_VERSION']
-    assert_equal 'HTTP/1.1', req['SERVER_PROTOCOL']
+    assert_equal 'HTTP/1.0', req['SERVER_PROTOCOL']
     assert_equal "", http
     assert ! parser.keepalive? # TODO: read HTTP/1.2 when it's final
   end
diff --git a/test/unit/test_http_parser_ng.rb b/test/unit/test_http_parser_ng.rb
index f5b575b..9b86cd3 100644
--- a/test/unit/test_http_parser_ng.rb
+++ b/test/unit/test_http_parser_ng.rb
@@ -294,7 +294,7 @@ class HttpParserNgTest < Test::Unit::TestCase
       "PATH_INFO"=>"/read-rfc1945-if-you-dont-believe-me",
       "REQUEST_URI"=>"/read-rfc1945-if-you-dont-believe-me",
       "SERVER_PORT"=>"80",
-      "SERVER_PROTOCOL"=>"HTTP/1.1", # FIXME
+      "SERVER_PROTOCOL"=>"HTTP/0.9",
       "REQUEST_METHOD"=>"GET",
       "QUERY_STRING"=>""
     }