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