diff --git a/app/src/main/java/com/nextcloud/android/sso/InputStreamBinder.java b/app/src/main/java/com/nextcloud/android/sso/InputStreamBinder.java index d04ac9ab4de2..22195227bbad 100644 --- a/app/src/main/java/com/nextcloud/android/sso/InputStreamBinder.java +++ b/app/src/main/java/com/nextcloud/android/sso/InputStreamBinder.java @@ -237,7 +237,7 @@ private HttpMethodBase buildMethod(NextcloudRequest request, Uri baseUri, InputS case "POST": method = new PostMethod(requestUrl); if (requestBodyInputStream != null) { - RequestEntity requestEntity = new InputStreamRequestEntity(requestBodyInputStream, -1); + RequestEntity requestEntity = new InputStreamRequestEntity(requestBodyInputStream); ((PostMethod) method).setRequestEntity(requestEntity); } else if (request.getRequestBody() != null) { StringRequestEntity requestEntity = new StringRequestEntity( @@ -251,7 +251,7 @@ private HttpMethodBase buildMethod(NextcloudRequest request, Uri baseUri, InputS case "PATCH": method = new PatchMethod(requestUrl); if (requestBodyInputStream != null) { - RequestEntity requestEntity = new InputStreamRequestEntity(requestBodyInputStream, -1); + RequestEntity requestEntity = new InputStreamRequestEntity(requestBodyInputStream); ((PatchMethod) method).setRequestEntity(requestEntity); } else if (request.getRequestBody() != null) { StringRequestEntity requestEntity = new StringRequestEntity( @@ -265,7 +265,7 @@ private HttpMethodBase buildMethod(NextcloudRequest request, Uri baseUri, InputS case "PUT": method = new PutMethod(requestUrl); if (requestBodyInputStream != null) { - RequestEntity requestEntity = new InputStreamRequestEntity(requestBodyInputStream, -1); + RequestEntity requestEntity = new InputStreamRequestEntity(requestBodyInputStream); ((PutMethod) method).setRequestEntity(requestEntity); } else if (request.getRequestBody() != null) { StringRequestEntity requestEntity = new StringRequestEntity(