-
-
Notifications
You must be signed in to change notification settings - Fork 7k
altsvc: accept ma/persist per alternative entry #20160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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
There was a problem hiding this 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.
|
augment review |
🤖 Augment PR SummarySummary: Adjust Alt-Svc parsing so Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this 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.
|
augment review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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