Skip to content

Commit 073e31d

Browse files
author
Hideki Itakura
authored
Merge pull request #1415 from couchbase/feature/issue_978_2
Fixed #978 - Cloudant could not handle POST /_changes request, and it…
2 parents daac12d + d25b2f0 commit 073e31d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/com/couchbase/lite/replicator/ChangeTracker.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ private boolean retryIfFailedPost(Response response) {
276276
// (See issues iOS #1020, #1267, Android #978)
277277
private boolean isCloudantAuthError(Response response) {
278278
String server = response.header("Server");
279-
if (server == null || server.indexOf("CouchDB/1.0.2") == -1)// (Accurate as of 5/2016)
279+
// Cloudant could send `CouchDB/ad97a06 (Erlang OTP/17)` as Server header value
280+
if (server == null || server.indexOf("CouchDB/") == -1)// (Accurate as of 5/2016)
280281
return false;
281282
// Note: 401 (UNAUTHORIZED) might not be caused by Cloudant
282283
// Before adding fix for 401, we need a test environment.

0 commit comments

Comments
 (0)