about summary refs log tree commit homepage
path: root/test/http.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/http.rb')
-rw-r--r--test/http.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/http.rb b/test/http.rb
index e23bddf..892e2db 100644
--- a/test/http.rb
+++ b/test/http.rb
@@ -38,6 +38,20 @@ class TestHTTP < Test::Unit::TestCase
     assert status.success?, status.inspect
   end
 
+  # neon does this
+  def test_empty_request_value
+    @client.write("GET / HTTP/1.1\r\n" \
+                  "Keep-Alive: \r\nConnection: TE,Keep-Alive\r\n\r\n")
+    buf = @client.readpartial(12345)
+    assert_match(%r{\AHTTP/1\.1 200 OK}, buf)
+
+    # ensure persistent connections work
+    @client.write("GET / HTTP/1.1\r\n" \
+                  "Missing-Space:\r\n\r\n")
+    buf = @client.readpartial(12345)
+    assert_match(%r{\AHTTP/1\.1 200 OK}, buf)
+  end
+
   def test_slash_for_mogadm_check
     Net::HTTP.start(@host, @port) do |http|
       [ Net::HTTP::Get, Net::HTTP::Head ].each do |meth|