On Fri, 2012-11-09 at 16:18 +0100, [email protected] wrote: > Hi Jean-Marc, Oleg, > > Thanks for your replies. > > I think I found the relevant part of the spec: > > rfc2616.pdf: page 17: > Many HTTP/1.1 header field values consist of words separated by LWS > or special characters. These special characters MUST be in a quoted > string to be used within a parameter value (as defined in section > 3.6). > token = 1*<any CHAR except CTLs or separators> > separators = "(" | ")" | "<" | ">" | "@" > | "," | ";" | ":" | "\" | <"> > | "/" | "[" | "]" | "?" | "=" > | "{" | "}" | SP | HT > > I noticed that GET request > http://www.livejasmin.com/listpage.php?tags=girl&type=40&openQuicklist > (not for the faint of heart: it's a porn website) > generates a response with a Set-Cookie where the ',' in the expires date > was not quoted. > > Is this something that a client program must be aware of, and somehow take > care of? > > Below my test program that tries to parse the expires date, and fails; > Does it contain any errors? > > Kind regards, > Paul. >
Paul Given it is a very common protocol violation HttpClient ships with a number of cookie policies (BROWSER_COMPATIBILITY, NETSCAPE_DRAFT as well as BEST_MATCH) that are capable of parsing such headers. There is nothing special one needs to do. Simply let HttpClient's default cookie policy do its job. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
