altsvc: accept ma/persist per alternative entry - #20160
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.
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.
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 |
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