> On Dec 5, 2014, at 9:22 PM, Vinay Bhinde <[email protected]> wrote:
>
> But the same cookie:header in custom-headers works very well in android.
That's because the bug I referred to only occurs on iOS. (The system
NSURLConnection class ignores 'Cookie' headers explicitly set by app code.)
> Furthermore in iOS too this thing works for the very first time (i.e it
> accepts the cookie header and authenticates ) but thereafter after
> restarting my app even though i send the cookie, CBLite doesn't use it and my
> login fails with SG.
Well let's see. Looking back at your first message, you say you're using custom
auth, and your auth server is on the same host as the SG. In that case you
shouldn't need to do anything special as far as setting cookie headers, because
the OS cookie store will send the cookie set by your auth server when it sends
requests to the SG. (Since IIRC cookies are not port-specific.)
What you are going to have to do is keep track of when the cookie expires,
since CBL doesn't know how to re-authenticate. If the cookie your auth returns
is non-persistent, that might explain why things stop working after relaunch.
You'd need to re-authenticate with your server on every launch before starting
replication.
> I kind of think the above warning is the the thing that is stopping new
> documents to be pulled into iOS client...as far as i understand it is
> referring to the fact that json in my document is bugged and not parsed by
> CBLite and that it needs linting right ?
That warning ("JSON error parsing _changes feed") means CBL is having trouble
parsing the list of change sent by the SG. There have been other recent reports
of this too from other users. It's being tracked as issue #541
<https://github.com/couchbase/couchbase-lite-ios/issues/541>.
But yes, this is preventing CBL from pulling changes.
I have an idea about what might be causing #541 and I can check in an
experimental fix soon.
—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/46803898-A6C2-46BA-AC65-CE26BF9A8D96%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.