Explorar el Código

Merge pull request #1894 from nextcloud/fixWalledGarden

Walled garden: 204 response: length is -1 (unknown) or 0 (null)
Andy Scherzinger hace 7 años
padre
commit
1ae12e2531

+ 2 - 1
src/main/java/com/owncloud/android/utils/ConnectivityUtils.java

@@ -68,7 +68,8 @@ public class ConnectivityUtils {
                     int status = client.executeMethod(get);
                     
                     if (serverVersion.compareTo(OwnCloudVersion.nextcloud_13) > 0) {
-                        return !(status == 204 && get.getResponseContentLength() == -1);
+                        return !(status == 204 &&
+                                (get.getResponseContentLength() == -1 || get.getResponseContentLength() == 0));
                     } else {
                         if (status == 200) {
                             try {