Bladeren bron

HDDS-705. addendum patch to fix find bug issue. Contributed by Bharat Viswanadham.

Bharat Viswanadham 6 jaren geleden
bovenliggende
commit
f6498af0d7

+ 3 - 1
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/EndpointBase.java

@@ -185,8 +185,10 @@ public class EndpointBase {
     LOG.info("Auth header string {}", auth);
 
     if (auth == null) {
+      // In this case, adding resource as Authorization, need to revisit in
+      // future if it needs to be changed.
       throw S3ErrorTable
-          .newError(S3ErrorTable.MALFORMED_HEADER, auth);
+          .newError(S3ErrorTable.MALFORMED_HEADER, "Authorization");
     }
 
     String userName;

+ 1 - 1
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/exception/S3ErrorTable.java

@@ -50,7 +50,7 @@ public final class S3ErrorTable {
       "is invalid.", HTTP_NOT_FOUND);
 
   public static final OS3Exception NO_SUCH_KEY = new OS3Exception(
-      "NoSuchObject", "The specified key does not exist", HTTP_NOT_FOUND);
+      "NoSuchKey", "The specified key does not exist", HTTP_NOT_FOUND);
 
   /**
    * Create a new instance of Error.