Skip to content

Commit

Permalink
Refactor read_status_line to read_response_line in HTTP1 connection.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Dec 26, 2023
1 parent 5290bfb commit 4172735
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/protocol/http1/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down

0 comments on commit 4172735

Please sign in to comment.