Closed bluemont closed 10 years ago
Mechanize splits cookies like this, more or less:
def parse_cookies(cookie_string)
cookie_string.split(/,(?=[^;,]*=)|,$/).map { |c| parse_cookie (c) }
end
def parse_cookie(string)
# ...
end
Would you be amenable to adding something along these lines? This happens with real world cookies.
Pretty sure this was fixed by https://github.com/dwaite/cookiejar/pull/2, no?
Let me know if this was not fixed by #2
CookieJar's goal is to parse RFC 2109 cookies, right?
According to RFC 2109: HTTP State Management Mechanism:
I haven't found an API method in
cookiejar
that handles comma-separated cookies. I triedset_cookie
and that failed.Unless I misunderstood the cookie spec and/or overlooked something in the code, this is a bug. I didn't see any tests checking for multiple cookies.
Hopefully easy to fix, though!