Skip to content

feat(services/http): support if_modified_since and if_unmodified_since#7636

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

feat(services/http): support if_modified_since and if_unmodified_since#7636
YuangGao wants to merge 1 commit into
apache:mainfrom
YuangGao:feat/http-conditional-read

Conversation

@YuangGao

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Part of #5486.

Rationale for this change

The http service already wires if_match / if_none_match on read and stat. RFC 7232 defines If-Modified-Since / If-Unmodified-Since as the date-based counterparts, and they're standard on every HTTP/1.1 server

What changes are included in this PR?

  • Inject If-Modified-Since / If-Unmodified-Since in http_get_request and http_head_request.
  • Declare read_with_if_modified_since, read_with_if_unmodified_since, stat_with_if_modified_since, stat_with_if_unmodified_since on the http service capability.

Are there any user-facing changes?

Yes — op.reader_with(path).if_modified_since(...) / if_unmodified_since(...) (and the stat equivalents) now work against http backends. No breaking changes.

AI Usage Statement

AI-assisted implementation.

@YuangGao YuangGao marked this pull request as ready for review May 29, 2026 05:19
@YuangGao YuangGao requested a review from Xuanwo as a code owner May 29, 2026 05:19
@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/http-conditional-read branch from 570288e to 324ccaa Compare May 29, 2026 05:34
@YuangGao YuangGao requested review from Zheaoli and messense as code owners May 29, 2026 05:34
@YuangGao

YuangGao commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

@Xuanwo This is ready for review. The failing checks are unrelated flaky tests. Could you help re-run them? Thanks!

Inject If-Modified-Since and If-Unmodified-Since in http_get_request
and http_head_request, and declare the matching read/stat capabilities.

Part of apache#5486.
@YuangGao YuangGao force-pushed the feat/http-conditional-read branch from 2aeec52 to 8c083c3 Compare June 23, 2026 01:03


@pytest.mark.need_capability(
"read", "read_with_if_modified_since", "read_with_if_unmodified_since"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, what does this change for python binding?

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:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants