class Protocol::HTTP::Cookie

def self.parse(string)

@returns [Cookie] The parsed cookie.
@parameter string [String] The string to parse.

Parse a string into a cookie.
def self.parse(string)
	head, *directives = string.split(/\s*;\s*/)
	
	key, value = head.split("=", 2)
	directives = self.parse_directives(directives)
	
	self.new(
		URL.unescape(key),
		URL.unescape(value),
		directives,
	)
end