ivandika3 commented on code in PR #6519:
URL: https://github.com/apache/ozone/pull/6519#discussion_r1563836962


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java:
##########
@@ -709,7 +710,10 @@ private void addKey(ListObjectResponse response, OzoneKey 
next) {
     keyMetadata.setKey(EncodingTypeObject.createNullable(next.getName(),
         response.getEncodingType()));
     keyMetadata.setSize(next.getDataSize());
-    keyMetadata.setETag("" + next.getModificationTime());
+    String eTag = next.getMetadata().get(ETAG);
+    if (eTag != null) {
+      keyMetadata.setETag(eTag);

Review Comment:
   Should we standardize so that the ETag returned needs to be surrounded by 
wrap in quotes? Similar to `CopyObjectResponse`? 
   
   From https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html
   
   However, it seems that the S3A pass even without the quotes. From what I 
briefly saw from `AbstractContractEtagTest`, the test does not assert the 
quotations of the ETag.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to