Skip to content

Commit

Permalink
Revert "Set content length to -1 for InputStream request bodies from …
Browse files Browse the repository at this point in the history
…the nextcloud/Android-SingleSignOn library"
  • Loading branch information
tobiasKaminsky authored and backportbot[bot] committed Jan 13, 2025
1 parent 426a625 commit c74b5c4
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 c74b5c4

Please sign in to comment.