Re: Sending Cookies in NSMutableURLRequest
Re: Sending Cookies in NSMutableURLRequest
- Subject: Re: Sending Cookies in NSMutableURLRequest
- From: Mark Pauley <email@hidden>
- Date: Mon, 12 Sep 2011 17:47:45 -0700
NSURLConnection doesn't give the cookies to the client during willSendRequest.
On Sep 12, 2011, at 3:20 PM, Quinn The Eskimo! wrote:
>
> On 12 Sep 2011, at 23:12, Jerry Krinock wrote:
>
>> When I send message -setHTTPShouldHandleCookies:YES to an NSMutableURLRequest, does that mean that it will search in -[[NSHTTPCookieStorage sharedHTTPCookieStorage], find all the cookies that are qualified by domain and path, and send them when in an NSURLConnection created with this request?
>
> Yes.
>
>> Is there a way to see the cookies that are actually being sent?
>
> You should take a look at the request that's passed to your -connection:willSendRequest:redirectResponse: delegate method. I don't know if we've applied the cookies by the time we call that method, but it's an easy thing to test.
>
>> Cookies don't seem to show in -allHTTPHeaders, and I cannot see them in tcpdump either if using SSL (https).
>
> One option here is to use an HTTPS proxy. IIRC QA1176 "Getting a Packet Trace" has a link to one.
>
> <http://developer.apple.com/library/mac/#qa/qa2001/qa1176.html>
>
> S+E
> --
> Quinn "The Eskimo!" <http://www.apple.com/developer/>
> Apple Developer Relations, Developer Technical Support, Core OS/Hardware
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Macnetworkprog mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden