about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/http.rb2
-rw-r--r--test/http_chunked_put.rb8
-rw-r--r--test/http_put.rb2
-rw-r--r--test/http_put_slow.rb1
4 files changed, 1 insertions, 12 deletions
diff --git a/test/http.rb b/test/http.rb
index b296ffa..c847046 100644
--- a/test/http.rb
+++ b/test/http.rb
@@ -184,7 +184,7 @@ class TestHTTP < Test::Unit::TestCase
     nr.times { @client.write(req2) }
     @client.write("GET /dev666/test HTTP/1.0\r\n\r\n")
     all = thr.value
-    assert_equal((nr * 2) + 1, all.split(/\r\n/).grep(/Status:/).size);
+    assert_equal((nr * 2) + 1, all.split(/\r\n/).grep(%r{^HTTP\/}).size);
   end
 
   def test_garbage
diff --git a/test/http_chunked_put.rb b/test/http_chunked_put.rb
index 817ced7..8f07c85 100644
--- a/test/http_chunked_put.rb
+++ b/test/http_chunked_put.rb
@@ -86,7 +86,6 @@ class TestHTTPChunkedPut < Test::Unit::TestCase
 
   def edge_finder(suf)
     expect = "HTTP/1.1 200 OK\r\n" \
-             "Status: 200 OK\r\n" \
              "Date: #{EPOCH}\r\n" \
              "Last-Modified: #{EPOCH}\r\n" \
              "Content-Length: 5\r\n" \
@@ -125,7 +124,6 @@ class TestHTTPChunkedPut < Test::Unit::TestCase
 
   def check_abcde(msg=nil)
     expect = "HTTP/1.1 201 Created\r\n" \
-      "Status: 201 Created\r\n" \
       "Date: #{EPOCH}\r\n" \
       "Content-Length: 0\r\n" \
       "Content-Type: text/plain\r\n" \
@@ -219,7 +217,6 @@ class TestHTTPChunkedPut < Test::Unit::TestCase
     t_yield
     @client.write(moar)
     expect = "HTTP/1.1 200 OK\r\n" \
-             "Status: 200 OK\r\n" \
              "Date: #{EPOCH}\r\n" \
              "Last-Modified: #{EPOCH}\r\n" \
              "Content-Length: 5\r\n" \
@@ -245,7 +242,6 @@ class TestHTTPChunkedPut < Test::Unit::TestCase
     check_abcde
     @client.write(more)
     expect = "HTTP/1.1 200 OK\r\n" \
-             "Status: 200 OK\r\n" \
              "Date: #{EPOCH}\r\n" \
              "Last-Modified: #{EPOCH}\r\n" \
              "Content-Length: 5\r\n" \
@@ -274,7 +270,6 @@ class TestHTTPChunkedPut < Test::Unit::TestCase
     t_yield
     @client.write(moar)
     expect = "HTTP/1.1 200 OK\r\n" \
-             "Status: 200 OK\r\n" \
              "Date: #{EPOCH}\r\n" \
              "Last-Modified: #{EPOCH}\r\n" \
              "Content-Length: 5\r\n" \
@@ -293,7 +288,6 @@ class TestHTTPChunkedPut < Test::Unit::TestCase
           "0\r\n\r\n"
     @client.write(req)
     expect = "HTTP/1.1 201 Created\r\n" \
-      "Status: 201 Created\r\n" \
       "Date: #{EPOCH}\r\n" \
       "Content-Length: 0\r\n" \
       "Content-Type: text/plain\r\n" \
@@ -316,7 +310,6 @@ class TestHTTPChunkedPut < Test::Unit::TestCase
     end.join
     @client.write(req)
     expect = "HTTP/1.1 201 Created\r\n" \
-      "Status: 201 Created\r\n" \
       "Date: #{EPOCH}\r\n" \
       "Content-Length: 0\r\n" \
       "Content-Type: text/plain\r\n" \
@@ -344,7 +337,6 @@ class TestHTTPChunkedPut < Test::Unit::TestCase
     end
 
     expect = "HTTP/1.1 201 Created\r\n" \
-      "Status: 201 Created\r\n" \
       "Date: #{EPOCH}\r\n" \
       "Content-Length: 0\r\n" \
       "Content-Type: text/plain\r\n" \
diff --git a/test/http_put.rb b/test/http_put.rb
index 537182c..5f1fea1 100644
--- a/test/http_put.rb
+++ b/test/http_put.rb
@@ -82,7 +82,6 @@ class TestHTTPPut < Test::Unit::TestCase
           "abcde"
     @client.write(req)
     expect = "HTTP/1.1 201 Created\r\n" \
-      "Status: 201 Created\r\n" \
       "Date: #{EPOCH}\r\n" \
       "Content-Length: 0\r\n" \
       "Content-Type: text/plain\r\n" \
@@ -103,7 +102,6 @@ class TestHTTPPut < Test::Unit::TestCase
     end.join
     @client.write(req)
     expect = "HTTP/1.1 201 Created\r\n" \
-      "Status: 201 Created\r\n" \
       "Date: #{EPOCH}\r\n" \
       "Content-Length: 0\r\n" \
       "Content-Type: text/plain\r\n" \
diff --git a/test/http_put_slow.rb b/test/http_put_slow.rb
index 6e0cc6f..2b37b0f 100644
--- a/test/http_put_slow.rb
+++ b/test/http_put_slow.rb
@@ -72,7 +72,6 @@ class TestHTTPPutSlow < Test::Unit::TestCase
           "\r\n"
     @client.write(req)
     expect = "HTTP/1.1 201 Created\r\n" \
-      "Status: 201 Created\r\n" \
       "Date: #{EPOCH}\r\n" \
       "Content-Length: 0\r\n" \
       "Content-Type: text/plain\r\n" \