Skip to content

Commit d25b2f0

Browse files
author
hideki
committed
Fixed #978 - Cloudant could not handle POST /_changes request, and it returns 401, 403, or 405
- Cloudant could send `CouchDB/ad97a06 (Erlang OTP/17)` as Server Http Header value. `CouchDB/1.0.2` does not meet all conditions
1 parent daac12d commit d25b2f0

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)