Parsing "Set-Cookie" HTTP Response
Parsing "Set-Cookie" HTTP Response
- Subject: Parsing "Set-Cookie" HTTP Response
- From: Jerry Krinock <email@hidden>
- Date: Mon, 19 Mar 2007 05:32:40 -0700
- Thread-topic: Parsing "Set-Cookie" HTTP Response
I've just run into and confirmed the same issue noted a year ago by Perry:
http://www.cocoadev.com/index.pl?ParsingHTTPHeaders
which is that:
(1) -[NSHTTPURLResponse allHeaderFields] unfortunately uses a comma to
delimit multiple cookies in the "Set-Cookie" field. (Unfortunate because
commas are also present in the expiration-date property of cookies.)
(2) +[NSHTTPCookie cookiesWithResponseHeaderFields:forURL:], which could
come to the rescue and provide a workaround, does not because it omits
cookies which do not have a 'domain' property.
Does anyone know a way around this, other than the obvious, brute-force
pre-parsing the expiration-date with NSScanner, using cURL instead, etc.?
Thanks,
Jerry Krinock
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden