diff --git a/test/net/http/utils.rb b/test/net/http/utils.rb index b9b289d..d097249 100644 --- a/test/net/http/utils.rb +++ b/test/net/http/utils.rb @@ -304,7 +304,10 @@ def handle_get(path, headers, socket) end def handle_post(path, headers, socket) - body = socket.read(headers['Content-Length'].to_i) + begin + body = socket.read(headers['Content-Length'].to_i) + rescue EOFError + end scheme = headers['X-Request-Scheme'] || 'http' host = @config['host'] port = socket.addr[1]