Skip to content

alt-svc: skip expired entries read from file#21187

Closed
bagder wants to merge 1 commit intomasterfrom
bagder/altsvc-expired
Closed

alt-svc: skip expired entries read from file#21187
bagder wants to merge 1 commit intomasterfrom
bagder/altsvc-expired

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Apr 1, 2026

Extend test 1654 to verify

@bagder bagder requested a review from Copilot April 1, 2026 07:17
@github-actions github-actions bot added the tests label Apr 1, 2026
@bagder bagder marked this pull request as ready for review April 1, 2026 07:18
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates Alt-Svc cache handling to ignore expired entries when loading from disk, and extends an existing unit test to validate that behavior.

Changes:

  • Skip adding Alt-Svc cache entries from file when their parsed expiry timestamp is already in the past.
  • Move/enable the debug/unit-test time override earlier in lib/altsvc.c so the new expiry check uses the deterministic CURL_TIME.
  • Extend test 1654 input to include an expired entry and adjust other timestamps to ensure the test remains stable.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/data/test1654 Adds an expired Alt-Svc line and updates dates so the output verifies that expired entries are skipped under fixed CURL_TIME.
lib/altsvc.c Skips expired entries during file load (altsvc_add) and ensures time() override is active for debug/unit-test builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bagder bagder closed this in 11609c3 Apr 1, 2026
@bagder bagder deleted the bagder/altsvc-expired branch April 1, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants