diff --git a/lib/async/http/protocol/http1/response.rb b/lib/async/http/protocol/http1/response.rb index 67e402d6..7a987dc9 100644 --- a/lib/async/http/protocol/http1/response.rb +++ b/lib/async/http/protocol/http1/response.rb @@ -18,9 +18,10 @@ def self.read(connection, request) UPGRADE = 'upgrade' - # @param reason [String] HTTP response line reason, ignored. + # @param reason [String] HTTP response line reason phrase def initialize(connection, version, status, reason, headers, body) @connection = connection + @reason = reason protocol = headers.delete(UPGRADE) @@ -30,6 +31,10 @@ def initialize(connection, version, status, reason, headers, body) def connection @connection end + + def reason + @reason + end def hijack? @body.nil?