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

def receive_headers(stream, headers, end_stream)

def receive_headers(stream, headers, end_stream)
	headers.each do |key, value|
		if key == SCHEME
			return @stream.send_failure(400, "Request scheme already specified") if @scheme
			
			@scheme = value
		elsif key == AUTHORITY
			return @stream.send_failure(400, "Request authority already specified") if @authority
			
			@authority = value
		elsif key == METHOD
			return @stream.send_failure(400, "Request method already specified") if @method
			
			@method = value
		elsif key == PATH
			return @stream.send_failure(400, "Request path already specified") if @path
			
			@path = value
		else
			@headers[key] = value
		end
	end
	
	# We only construct the input/body if data is coming.
	unless end_stream
		@body = @input = Body::Writable.new
	end
	
	# We are ready for processing:
	@protocol.requests.enqueue self
end