fmorg-git commented on code in PR #9343:
URL: https://github.com/apache/ozone/pull/9343#discussion_r2608786801


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/signature/AWSSignatureProcessor.java:
##########
@@ -89,13 +99,56 @@ public SignatureInfo parseSignature() throws OS3Exception {
       }
     }
     if (signatureInfo == null) {
-      signatureInfo = new SignatureInfo.Builder(Version.NONE).build();
+      signatureInfo = new 
SignatureInfo.Builder(Version.NONE).setService("s3").build();
     }
+    String payloadHash = getPayloadHash(headers, signatureInfo);
+    signatureInfo.setPayloadHash(payloadHash);
     signatureInfo.setUnfilteredURI(
         context.getUriInfo().getRequestUri().getPath());
     return signatureInfo;
   }
 
+  private String getPayloadHash(Map<String, String> headers, SignatureInfo 
signatureInfo)
+      throws OS3Exception, NoSuchAlgorithmException, IOException {
+    if (signatureInfo.getVersion() == Version.V2) {
+      return "";

Review Comment:
   ok thanks



-- 
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