diff --git a/test/http-client-tests/src/main/java/software/amazon/awssdk/http/SdkHttpClientDefaultTestSuite.java b/test/http-client-tests/src/main/java/software/amazon/awssdk/http/SdkHttpClientDefaultTestSuite.java index 7235ff04ebd..d6859a4955c 100644 --- a/test/http-client-tests/src/main/java/software/amazon/awssdk/http/SdkHttpClientDefaultTestSuite.java +++ b/test/http-client-tests/src/main/java/software/amazon/awssdk/http/SdkHttpClientDefaultTestSuite.java @@ -243,9 +243,7 @@ private void validateResponse(HttpExecuteResponse response, .withHeader("Content-Length", equalTo("4")); } else { patternBuilder.withRequestBody(absent()); - if (method == SdkHttpMethod.PATCH || method == SdkHttpMethod.POST || method == SdkHttpMethod.PUT) { - patternBuilder.withHeader("Content-Length", equalTo("0")); - } else { + if (method != SdkHttpMethod.PATCH && method != SdkHttpMethod.POST && method != SdkHttpMethod.PUT) { patternBuilder.withoutHeader("Content-Length"); } }