class Async::HTTP::Protocol::HTTP2::Response::Stream
def receive_initial_headers(headers, end_stream)
def receive_initial_headers(headers, end_stream) headers.each do |key, value| if key == STATUS @response.status = Integer(value) elsif key == PROTOCOL @response.protocol = value elsif key == CONTENT_LENGTH @length = Integer(value) else add_header(key, value) end end @response.headers = @headers if @response.valid? if !end_stream # We only construct the input/body if data is coming. @response.body = prepare_input(@length) elsif @response.head? @response.body = ::Protocol::HTTP::Body::Head.new(@length) end else send_reset_stream(::Protocol::HTTP2::Error::PROTOCOL_ERROR) end self.notify! return headers end