Closed
Description
Expected Behavior
If S3Client.getObject() with range is called, GetObjectRequest.contentRange() should return value of Content-Range header (e.g. "bytes 100-200/1000").
Current Behavior
GetObjectRequest.contentRange() always returns null.
Possible Solution
'x-amz-content-range' header contains the desired value.
Populate contentRange field by 'x-amz-content-range' header instead of 'Content-Range' header.
Steps to Reproduce (for bugs)
String bucketName = "specify your bucket";
String key = "specify your object's key";
GetObjectRequest getObjectRequest = GetObjectRequest.builder()
.bucket(bucketName)
.key(key)
.range("bytes=2-3")
.build();
GetObjectResponse response = s3Client.getObject(getObjectRequest).response();
assertNotNull(response.contentRange()); // -> fails
Your Environment
- AWS Java SDK version used: 2.5.25
- JDK version used: java version "1.8.0_191"
- Operating System and version: macOS 10.14.4