Skip to content

fix(network): refetch when revalidation reaches a different URL - #145

Open
TKY-27 wants to merge 1 commit into
sahenjp:mainfrom
TKY-27:fix/revalidation-redirect-target
Open

TKY-27 wants to merge 1 commit into
sahenjp:mainfrom
TKY-27:fix/revalidation-redirect-target

Conversation

@TKY-27

@TKY-27 TKY-27 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

A redirect can move to a different resource with the same ETag or Last-Modified value. Its 304 response must not reuse the previous target's body. Clear the stale validators and refetch within the original deadline.

The regression covers both validators, retries=0, the new body/URL and the next cache hit. It fails before the fix.

Validation: Linux x86_64, Rust 1.100.0; offline loopback tests with proxy environment variables omitted.

  • cargo test --locked --all-targets: 1,138 passed, 4 existing tests ignored.
  • cargo clippy --locked --all-targets -- -D warnings: passed.
  • cargo fmt --all --check: blocked by existing main formatting failures; this patch adds none.

AI assistance: implementation, tests and independent agent review.

@TKY-27
TKY-27 requested a review from sahenjp as a code owner November 15, 2026 22:16
Copilot AI balanced review requested due to automatic review settings November 15, 2026 22:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants