From 41727353a1c42337c6a91c584d74538b9ed4e01e Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Wed, 27 Dec 2023 01:34:43 +1300 Subject: [PATCH] Refactor read_status_line to read_response_line in HTTP1 connection. --- lib/protocol/http1/connection.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/protocol/http1/connection.rb b/lib/protocol/http1/connection.rb index 7c6c36b..7cfb0ba 100644 --- a/lib/protocol/http1/connection.rb +++ b/lib/protocol/http1/connection.rb @@ -200,7 +200,7 @@ def read_request return headers.delete(HOST), method, path, version, headers, body end - def read_status_line + def read_response_line version, status, reason = read_line.split(/\s+/, 3) status = Integer(status) @@ -209,7 +209,7 @@ def read_status_line end def read_response(method) - version, status, reason = read_status_line + version, status, reason = read_response_line headers = read_headers