Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hadoop-ozone/dist/src/main/smoketest/s3/objecthead.robot
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Head existing object
${result} = Execute AWSS3APICli and checkrc put-object --bucket ${BUCKET} --key ${PREFIX}/headobject/key=value/f1 --body /tmp/testfile 0

${result} = Execute AWSS3APICli and checkrc head-object --bucket ${BUCKET} --key ${PREFIX}/headobject/key=value/f1 0
Should Contain ${result} "StorageClass":
${result} = Execute AWSS3APICli and checkrc delete-object --bucket ${BUCKET} --key ${PREFIX}/headobject/key=value/f1 0

Head object in non existing bucket
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,14 @@ public Response head(
throw ex;
}

S3StorageType s3StorageType = key.getReplicationConfig() == null ?
S3StorageType.STANDARD :
S3StorageType.fromReplicationConfig(key.getReplicationConfig());

ResponseBuilder response = Response.ok().status(HttpStatus.SC_OK)
.header("Content-Length", key.getDataSize())
.header("Content-Type", "binary/octet-stream");
.header("Content-Type", "binary/octet-stream")
.header(STORAGE_CLASS_HEADER, s3StorageType.toString());

String eTag = key.getMetadata().get(ETAG);
if (eTag != null) {
Expand Down