peterxcli commented on code in PR #10207:
URL: https://github.com/apache/ozone/pull/10207#discussion_r3206413001
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/S3ConditionalRequest.java:
##########
@@ -79,6 +79,46 @@ static Response evaluateReadPreconditions(HttpHeaders
headers,
return null;
}
+ /**
+ * Evaluates copy source preconditions for CopyObject operation.
+ * Checks x-amz-copy-source-if-match, x-amz-copy-source-if-none-match,
+ * x-amz-copy-source-if-modified-since,
x-amz-copy-source-if-unmodified-since.
+ *
+ * @param headers HTTP headers containing the conditional headers
+ * @param sourceKeyPath path of the source key for error messages
+ * @param sourceKey the source key metadata
+ * @throws OS3Exception with 412 Precondition Failed if conditions are not
met
+ */
+ static void evaluateCopySourcePreconditions(HttpHeaders headers,
Review Comment:
could you try to reuse the `evaluateReadPreconditions`?
--
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]