Gargi-jais11 commented on code in PR #11870:
URL: https://github.com/apache/ozone/pull/11870#discussion_r4453761413
##########
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:
> However, Ozone is designed to read the entire object in this case.
@chungen0126 I don't have context related to this. Let me gather some
information and then we can discuss. Or if u know anyone from committee who can
confirm this, it would be nice.
--
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]