>From the NSHTTPCookieStorage? What does that mean? >From iOS Phonegap, can I:
1) make an http request directly to my SGW with my session cookies set (i.e. Cookie: SyncGatewaySession=blah) 2) AND THEN make a request to http://lite.couchbase./ When this starts replication, would it use the cookies from my first HTTP request to the SGW? Is that what you mean by looking up from the NSHTTPCookieStorage? slim On Wednesday, November 19, 2014 1:00:27 PM UTC-5, Jens Alfke wrote: > > > > On Nov 18, 2014, at 7:42 PM, Seung Chan Lim <[email protected] > <javascript:>> wrote: > > > > Hmmm... Good catch. It's not. I assumed that it was, but I was wrong. > Then am I misunderstanding something about calling _replicate? > > No; but I just remembered a detail about Cocoa's NSURLConnection class — > IIRC, "Cookie:" headers that the client adds to the request will be > overwritten by cookies looked up from the NSHTTPCookieStorage. > > In the native API the CBLReplication class has a method to set a cookie, > but in REST your only option is to specify it as a header the way you're > doing, so this looks like a real problem. Hm. > > I've just sent a question to Apple's networking mailing list to see if > there's a way around that. Otherwise I don't have any good workarounds for > you, other than somehow getting your custom auth API to appear to come from > the same host/port as the Sync Gateway, so that it can use a Set-Cookie: > response header. > > —Jens -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/35db4581-29f5-410e-9054-5cff735327d3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
