• 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
Re: WebView and cookies
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WebView and cookies


  • Subject: Re: WebView and cookies
  • From: Mirko Viviani <email@hidden>
  • Date: Fri, 17 Jul 2015 23:19:04 +0200

On Jul 16, 2015, at 18:19, Jens Alfke <email@hidden> wrote:

>> On Jul 16, 2015, at 3:37 AM, Mirko Viviani <email@hidden <mailto:email@hidden>> wrote:
>>
>> I’m using the following code for FaceBook authentication with custom cookie management (-setHTTPShouldHandleCookies:NO),
>> but recently it has stopped working with a web message ‘Cookies are not enabled’.
>
> Have you set breakpoints or added logging to examine what headers you’re sending in your requests, and what you’re getting in the responses?

Yes, now the Cookie: header is sent/received only when -setHTTPShouldHandleCookies:YES, but that code used to work until ~ a month ago.


>>        NSDictionary *headers = [NSHTTPCookie requestHeaderFieldsWithCookies:cookies];
>>        NSString *cookieHeader = [headers objectForKey:@"Cookie"];
>>        if (cookieHeader) {
>>            [mutableRequest setValue:cookieHeader forHTTPHeaderField:@"Cookie"];
>>        }
>
> I think the intent of +requestHeaderFieldsWithCookies: is that you should add all the returned headers to the request. In practice this might just be a single “Cookie:” header, but it’s probably best not to second-guess the framework.


Hmm I’ll look at it, anyway it is used in the google-gdata framework with its custom cookies storage.

--
Best regards,
Mirko
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


References: 
 >WebView and cookies (From: Mirko Viviani <email@hidden>)
 >Re: WebView and cookies (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Question about enums
  • Next by Date: Re: Safe time to add accessory view to NSSavePanel in sandboxed app?
  • Previous by thread: Re: WebView and cookies
  • Next by thread: Integrating touch Id with sign up-in process in client-server based app
  • Index(es):
    • Date
    • Thread