Repository navigation
rgw: evaluate If-Match before If-Modified-Since on GET - #73205
RaminNietzsche wants to merge 1 commit into
Conversation
RFC 9110 section 13.2.2 evaluates If-Match before If-Modified-Since. RGW checked the date preconditions first in Object::Read::prepare, so GetObject with a failing If-Match and a future If-Modified-Since was answered 304 Not Modified instead of 412 Precondition Failed. Evaluate entity-tag preconditions before the date block in the RADOS and POSIX read prepare paths. The existing guards that skip If-Modified-Since when If-None-Match is present, and If-Unmodified-Since when If-Match is present, are unchanged. Fixes: https://tracker.ceph.com/issues/82233 Fixes: https://tracker.ceph.com/issues/19965 Signed-off-by: ramin.najarbashi <[email protected]>
RFC 9110 RGW audit — series contextThis PR is one focused change from an RFC 9110 conformance review of RGW (S3, Swift, Admin, STS). Each PR is meant to review and merge on its own; there is no batch dependency unless called out below.
Same audit, already tracked on other PRs (not part of this series authorship):
Follow-ups from the audit not opened yet: T4d Shared repro script and sample output: https://gist.github.com/RaminNietzsche/818ad8dd6b8d8093560183cd09d2b169 ( This PR (T4a): RFC 9110 §13.2.2 — when both |
|
jenkins test make check arm64 |
|
@adamemerson Thanks for the approval. CI is green now (the |
|
Yes, sorry, forgot to add that. |
|
This PR has been added to wip-anrao6-testing-2026-11-13-0833-main. |
Summary
RFC 9110 13.2.2 evaluates
If-MatchbeforeIf-Modified-Since. RGW checked date preconditions first inObject::Read::prepare, so GetObject with a failingIf-Matchand a futureIf-Modified-Sincewas answered 304 instead of 412.If-Modified-SincewhenIf-None-Matchis present (andIf-Unmodified-SincewhenIf-Matchis present) are unchanged.test_get_object_ifmatch_failed_with_ifmodifiedsince(412) andtest_get_object_ifmatch_good_with_ifmodifiedsince_future(304 when ETag matches).Fixes: https://tracker.ceph.com/issues/82233
Fixes: https://tracker.ceph.com/issues/19965
Probe script (case
T4 If-Match fails + If-Modified-Since future): https://gist.github.com/RaminNietzsche/818ad8dd6b8d8093560183cd09d2b169Testing
On a single-host vstart cluster built from this branch (tree at
5ab2b0ddb70+ this commit):If-Match: "ABCORZ"+If-Modified-Since: 2100-01-01If-Match: <etag>+If-Modified-Since: 2100-01-01s3-tests:
-k "test_get_object_ifmatch_failed_with_ifmodifiedsince or test_get_object_ifmatch_good_with_ifmodifiedsince_future"— 2 passed.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.