We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 570c895 + c0bbbf7 commit eb99084Copy full SHA for eb99084
src/main/java/com/amazonaws/services/s3/AmazonS3Client.java
@@ -944,7 +944,8 @@ public PutObjectResult putObject(PutObjectRequest putObjectRequest)
944
request.addHeader(Headers.STORAGE_CLASS, putObjectRequest.getStorageClass());
945
}
946
947
- if (metadata.getContentLength() <= 0) {
+ // Use internal interface to differentiate 0 from unset.
948
+ if (metadata.getRawMetadata().get(Headers.CONTENT_LENGTH) == null) {
949
/*
950
* There's nothing we can do except for let the HTTP client buffer
951
* the input stream contents if the caller doesn't tell us how much
0 commit comments