Scott, I'm not sure what you mean in your original message by "the
cookie gets set and saved". Can you rephrase that in Cocoa methods?
That is, are you getting the shared cookie storage (using
[NSHTTPCookieStorage sharedHTTPCookieStorage] ),and using it to set
(save) the cookie manually, or do you mean something else?
I'm not very conversant with this area, but I don't see anything in
the documentation that states that responses containing SetCookie
will automatically put those cookies into the shared storage for
future use with requests -- that is, you have to do it manually.
> I am using sendSyncronousRequest. It just seems that if no cookie
> exists that its having difficulty.. If the cookie already exists
> and was saved by safari all is well..
> Scott Andrew
> On Dec 23, 2005, at 8:16 PM, Jeff LaMarche wrote:
>> Don't know if I can answer your question, but I've found that some
>> luck creating an NSMutableURLRequest and then using
>> NSURLConnection's sendSynchronousRequest:returningResponse:error:
>> and it seems to respect the cookies.
>> I don't think it's NSURLRequest that's the issue, but how you're
>> using NSURLConnection. Are you doing this synchronously or
>> I don't know if I can help much, but I've got a small command-line
>> for authentication. It's not a GUI program and doesn't use
>> On Dec 23, 2005, at 11:14 AM, Scott Andrew wrote:
>>> I have a question. (I asked this on the webkit list too, i am not
>>> sure which list is correct).
>>> I am working on some code using NSURLRequest but i am having
>>> issues with cookies.
>>> If i delete the cookie for the website and go in through my code
>>> and login, all log's in OK and i can see in Ethereal that there
>>> is a set cookie. The cookie gets set and saved, however, it seems
>>> the cookie isn't being used because any more queries to the web
>>> site are telling me i must be logged in (i should be).
>>> If i go through safari first then a cookie is created (different
>>> than the one originally created) and all works fine. If after
>>> logging in through the web site i go to my applicatoin all works
>>> fine until the cookie is deleted.
>>> So my question is using NSURLRequest what am I missing?
>>> Scott Andrew
>>> Do not post admin requests to the list. They will be ignored.
>>> Cocoa-dev mailing list (Cocoa-dev@list...)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/cocoa-dev/jeff_lamarche% >>> 40mac.com
>>> This email sent to jeff_lamarche@mac.... >>
> Do not post admin requests to the list. They will be ignored.
> Webkitsdk-dev mailing list (Webkitsdk-dev@list...)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webkitsdk-dev/rsherry% > 40adobe.com
> This email sent to rsherry@adob...