http: fix Curl_compareheader for multi value headers#20894
http: fix Curl_compareheader for multi value headers#20894
Conversation
|
augment review |
🤖 Augment PR SummarySummary: Fixes 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Pull request overview
Fixes a regression in Curl_compareheader() (introduced after 04289c6) so that multi-value HTTP headers are properly searched again, and updates the relevant test data to include a multi-value Connection: response header.
Changes:
- Update
Curl_compareheader()logic intended to iterate over comma-separated header values again. - Adjust
tests/data/test1to use multiple values in theConnection:response header.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/data/test1 | Updates the canned HTTP response to include multi-value Connection: header values. |
| lib/http.c | Changes the header value matching loop in Curl_compareheader() to handle multiple values. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Follow-up to 04289c6. Regression shipped in 8.13.0. - a logic error made it not loop and thus only match if the searched string was first - it no longer matches a substring Adjusted test 1 to use multiple values in the Connection: response header. Adjusted test 1542 to have a "Connection: close-not" which should not match. Reported-by: Henrique Pereira
3eca859 to
a38365f
Compare
Follow-up to 04289c6. Regression shipped in 8.13.0.
a logic error made it not loop and thus only match if the searched string was first
it no longer matches a substring
Adjusted test 1 to use multiple values in the Connection: response header.
Reported-by: Henrique Pereira