• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Parsing "Set-Cookie" HTTP Response
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Parsing "Set-Cookie" HTTP Response
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: NSDatePicker behaviour is odd when typing date
  • Next by Date: Re: Standby: Handling going into and coming out from standby
  • Previous by thread: Re: NSString escaping single quotes
  • Next by thread: Re: Parsing "Set-Cookie" HTTP Response
  • Index(es):
    • Date
    • Thread