diff options
author | Eric Wong <bofh@yhbt.net> | 2020-07-23 04:17:34 +0000 |
---|---|---|
committer | Eric Wong <bofh@yhbt.net> | 2020-07-24 06:03:51 +0000 |
commit | 3137c81b3653f2348bbcedb97aae937ba9469299 (patch) | |
tree | 01bba39bb8891ccadf403f3d092d46c932e4cce0 | |
parent | 92f587c191c96e201984d47ccdaf43a1bff2fc17 (diff) | |
download | unicorn-3137c81b3653f2348bbcedb97aae937ba9469299.tar.gz |
IO#sysread may only capture the 103 response and return before the server can send the 200. Since we don't support persistent connections, we can just use IO#read to rely on the server giving us an EOF after the 200 is sent. Cc: Jean Boussier <jean.boussier@gmail.com>
-rw-r--r-- | test/unit/test_server.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/unit/test_server.rb b/test/unit/test_server.rb index d706243..384fa6b 100644 --- a/test/unit/test_server.rb +++ b/test/unit/test_server.rb @@ -106,7 +106,7 @@ class WebServerTest < Test::Unit::TestCase sock = TCPSocket.new('127.0.0.1', @port) sock.syswrite("GET / HTTP/1.0\r\n\r\n") - responses = sock.sysread(4096) + responses = sock.read(4096) assert_match %r{\AHTTP/1.[01] 103\b}, responses assert_match %r{^Link: </style\.css>}, responses assert_match %r{^Link: </script\.js>}, responses |