adoroszlai commented on code in PR #11870:
URL: https://github.com/apache/ozone/pull/11870#discussion_r4466993800


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -398,6 +393,14 @@ Response handleGetRequest(ObjectRequestContext context, 
String keyPath)
 
       context.setAction(S3GAction.GET_KEY);
 
+      String rangeHeaderVal = getHeaders().getHeaderString(RANGE_HEADER);
+      
validatePartNumberAndRange(queryParams().containsKey(QueryParams.PART_NUMBER), 
rangeHeaderVal, keyPath);
+      final int partNumber = queryParams().getInt(QueryParams.PART_NUMBER, 0);
+      // A negative part number is not a valid part; reject it as 
InvalidArgument.
+      if (partNumber < 0) {
+        throw newError(INVALID_ARGUMENT, String.valueOf(partNumber));
+      }

Review Comment:
   Sorry I thought 5dbcd65447927d10fe261d6084b49202f5b01f7a addresses this 
discussion, but now I see it precedes it.



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