ItsM0rty opened a new pull request, #882:
URL: https://github.com/apache/arrow-rs-object-store/pull/882

   # Which issue does this PR close?
   
   Closes #881.
   
   # Rationale for this change
   
   `GetOptions::check_preconditions` compares ETag strings exactly for both 
conditions. An in-memory object with ETag `"1"` is returned for `If-None-Match: 
W/"1"`, even though the weak validator matches. Two identical weak tags also 
incorrectly satisfy `If-Match`.
   
   RFC 9110 requires weak comparison for `If-None-Match` and strong comparison 
for `If-Match`.
   
   # What changes are included in this PR?
   
   Strip the case-sensitive `W/` prefix from both tags for `If-None-Match`, and 
reject weak metadata tags for explicit `If-Match` lists. Wildcard handling, 
date precedence, returned metadata and conditional-write handling stay the 
same. The field docs now state the comparison semantics.
   
   Three new tests fail against upstream and pass with the fix. They cover tag 
combinations and lists, nonmatches, wildcards, and a conditional read through 
the actual `InMemory` store.
   
   On Linux (WSL) with the pinned Rust 1.97.0 toolchain, `cargo fmt -- 
--check`, `cargo test` and `cargo clippy -- -D warnings` pass. The 
default-feature test run passed 104 unit tests, 3 filesystem integration tests 
and 31 doctests, with 3 existing ignored tests. Cloud integration tests were 
not run.
   
   On Windows GNU, the unit run passed 92 tests and failed 3 filesystem tests. 
Those same 3 failures also reproduce on untouched upstream (89 pass, 3 fail).
   
   # Are there any user-facing changes?
   
   Matching weak validators now return `Error::NotModified` for conditional 
reads. Weak tags cannot satisfy explicit `If-Match` conditions. Public API 
shapes are unchanged. This does not change cloud providers' handling of 
forwarded conditions or redesign ETag-list parsing.
   
   


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