gruuya commented on code in PR #5506:
URL: https://github.com/apache/opendal/pull/5506#discussion_r1901851965


##########
core/src/layers/correctness_check.rs:
##########
@@ -122,12 +122,16 @@ impl<A: Access> LayeredAccess for CorrectnessAccessor<A> {
                 "if_not_exists",
             ));
         }
-        if args.if_none_match().is_some() && 
!capability.write_with_if_none_match {
-            return Err(new_unsupported_error(
-                self.info.as_ref(),
-                Operation::Write,
-                "if_none_match",
-            ));
+        if let Some(if_none_match) = args.if_none_match() {
+            // AWS S3 supports only wildcard (every resource) matching
+            let is_s3_wildcard_match = self.info.scheme() == Scheme::S3 && 
if_none_match == "*";
+            if !is_s3_wildcard_match || !capability.write_with_if_none_match {

Review Comment:
   One alternative might be to generalize this to:
   ```suggestion
               let if_none_match_wildcard =
                   if_none_match == "*" && !capability.write_with_if_not_exists;
               if !if_none_match_wildcard || 
!capability.write_with_if_none_match {
   ```
   
   But then this would need to be reflected in all potential clients as well.



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

Reply via email to