Thanks, setting host to null resolved my issue

On Monday, February 16, 2015 at 2:05:30 AM UTC-8, Constantine Kozak wrote:
>
>
>
> I want to use Replication with custom auth. As I understand I can get 
> sessionId with my own means (app calls my server which POST to 
> SyncGateway's _session) and then just set a cookie in Replication and it 
> should pass it. I create a replication in a such way:
>
> Replication pullReplication = database.createPullReplication("
>> http://host.com:4984/dbName";);
>> pullReplication.setContinuous(true);
>> pullReplication.setCookie("SyncGatewaySession", "<SESSION ID VALUE>", "
>> host.com:4984", expireDate, false, false);
>
>
> and get these:
>
>> 02-16 05:01:07.370    4706-4746/com.phrazr.android.staging 
>> E/RemoteRequest﹕ Got error status: 401 for 
>> http://host.com:4984/dbName/_local/d07fc6d8daf6751891ac5d806aaf5a6cf2945960. 
>>  Reason: Unauthorized
>
>
> I checked in a http sniffer - cookies are not sent. The only headers 
> present are: Host=host.com:4984, Accept=multipart/related, 
> application/json and Connection=Keep-Alive.
>
> Am I using setCookie in a wrong way or it's a bug?
>

-- 
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/a79456f8-ef5c-47b7-8e2b-130fb3ac6821%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to