Skip to content

Commit

Permalink
Merge pull request #14324 from nextcloud/revert-13232-patch-1
Browse files Browse the repository at this point in the history
Revert "Set content length to -1 for InputStream request bodies from the nextcloud/Android-SingleSignOn library"
  • Loading branch information
tobiasKaminsky authored Jan 13, 2025
2 parents e2fc4e7 + a7c8d19 commit e37d88b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand Down

0 comments on commit e37d88b

Please sign in to comment.