Skip to content

Conversation

@bagder
Copy link
Member

@bagder bagder commented Jan 2, 2026

The 'ma' and 'persist' keywords should be considered per list entry, not once per header.

Expand test 1654 to verify such headers

Reported-by: Hunt Darlener

The 'ma' and 'persist' keywords should be considered per list entry, not
once per header.

Expand test 1654 to verify such headers

Reported-by: Hunt Darlener
@github-actions github-actions bot added the tests label Jan 2, 2026
@bagder bagder requested a review from Copilot January 2, 2026 10:21
@bagder bagder marked this pull request as ready for review January 2, 2026 10:21
Copy link

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

This PR fixes the Alt-Svc header parsing to correctly handle 'ma' (max-age) and 'persist' parameters on a per-entry basis rather than globally per header. Previously, these parameters would apply to all alternative service entries in a header; now each entry can have its own values.

Key changes:

  • Moved maxage and persist variable initialization into the per-entry parsing loop
  • Moved the ma/persist parameter parsing from header level to entry level
  • Updated test to verify per-entry ma values are correctly applied

Reviewed changes

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

File Description
lib/altsvc.c Refactored parsing logic to initialize and parse ma/persist parameters per alternative service entry instead of once per header
tests/unit/unit1654.c Modified existing test case to include per-entry ma values and added new test case to verify different ma values for different entries
tests/data/test1654 Added expected output entries for the new test case with correct expiration times

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

@bagder
Copy link
Member Author

bagder commented Jan 2, 2026

augment review

@augmentcode
Copy link

augmentcode bot commented Jan 2, 2026

🤖 Augment PR Summary

Summary: Adjust Alt-Svc parsing so ma (max-age) and persist are applied per alternative entry, rather than once per header.

Changes:

  • Move maxage/persist defaults into the per-entry parse loop in Curl_altsvc_parse()
  • Parse optional ma/persist parameters immediately after each entry’s quoted authority
  • Expand unit test 1654 (and its expected output) to verify mixed per-entry ma values and unknown parameters

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Copy link

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


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

@bagder
Copy link
Member Author

bagder commented Jan 2, 2026

augment review

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@bagder bagder closed this in 03c9215 Jan 2, 2026
@bagder bagder deleted the bagder/alt-svc-parser branch January 2, 2026 22:50
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.

1 participant