class Async::HTTP::Protocol::HTTP2::Request

def send_response(response)

def send_response(response)
	if response.nil?
		@stream.send_headers(nil, NO_RESPONSE, ::HTTP::Protocol::HTTP2::END_STREAM)
	elsif response.body?
		pseudo_headers = [
			[STATUS, response.status],
		]
		
		if length = response.body.length
			pseudo_headers << [CONTENT_LENGTH, length]
		end
		
		headers = Headers::Merged.new(
			pseudo_headers,
			response.headers
		)
		
		@stream.send_headers(nil, headers)
		@stream.send_body(response.body)
	else
		headers = Headers::Merged.new([
			[STATUS, response.status],
		], response.headers)
		
		@stream.send_headers(nil, headers, ::HTTP::Protocol::HTTP2::END_STREAM)
	end
end