Skip to content

feat(services/webdav): support conditional read headers#7637

Open
YuangGao wants to merge 1 commit into
apache:mainfrom
YuangGao:feat/webdav-conditional-read
Open

feat(services/webdav): support conditional read headers#7637
YuangGao wants to merge 1 commit into
apache:mainfrom
YuangGao:feat/webdav-conditional-read

Conversation

@YuangGao
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Part of #5486.

Rationale for this change

The webdav service already supports read but ignored the OpRead argument, so conditional headers never reached the GET request. Per RFC 7232 (HTTP/1.1 conditional requests, inherited by WebDAV servers), If-Match / If-None-Match / If-Modified-Since / If-Unmodified-Since are standard on GET.

What changes are included in this PR?

  • Inject the four conditional headers in webdav_get.
  • Declare read_with_if_match, read_with_if_none_match, read_with_if_modified_since, read_with_if_unmodified_since on the webdav service capability.

Stat-side conditional support (PROPFIND) is left for a follow-up because webdav_stat doesn't currently accept OpStat and PROPFIND conditional semantics are server-dependent.

Are there any user-facing changes?

Yes — op.reader_with(path).if_match(...) (and the three siblings) now work against webdav backends. No breaking changes;

AI Usage Statement

AI-assisted implementation.

@YuangGao YuangGao marked this pull request as ready for review May 29, 2026 05:31
@YuangGao YuangGao requested a review from Xuanwo as a code owner May 29, 2026 05:31
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. releases-note/feat The PR implements a new feature or has a title that begins with "feat" labels May 29, 2026
@YuangGao YuangGao force-pushed the feat/webdav-conditional-read branch from acc918e to 4879d7d Compare May 29, 2026 05:40
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels May 29, 2026
@YuangGao YuangGao force-pushed the feat/webdav-conditional-read branch from 4879d7d to ac45f57 Compare May 29, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/feat The PR implements a new feature or has a title that begins with "feat" size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant