diff --git a/test/net/http/utils.rb b/test/net/http/utils.rb index cb621da..1d43497 100644 --- a/test/net/http/utils.rb +++ b/test/net/http/utils.rb @@ -29,7 +29,7 @@ def start loop do socket = @ssl_server ? @ssl_server.accept : @server.accept run(socket) - rescue => e + rescue ensure socket.close if socket end @@ -58,7 +58,7 @@ def handle_request(socket) request_line = socket.gets return if request_line.nil? || request_line.strip.empty? - method, path, version = request_line.split + method, path, _version = request_line.split headers = {} while (line = socket.gets) break if line.strip.empty? @@ -121,10 +121,6 @@ def continue @socket.write "HTTP\/1.1 100 continue\r\n\r\n" end - def query - @query - end - def remote_ip @socket.peeraddr[3] end