class Async::HTTP::Protocol::HTTP11

def read_headers

def read_headers
	fields = []
	
	each_line do |line|
		if line =~ /^([a-zA-Z\-]+):\s*(.+?)\s*$/
			fields << [$1, $2]
		else
			break
		end
	end
	
	return Headers.new(fields)
end