Repository navigation
Conversation
Use of curlx_str_ functions avoids having a copy.
There was a problem hiding this comment.
🟡 Changes recommended
lib/vauth/digest.h now references struct Curl_str without a forward declaration or include, which breaks compilation for translation units including this header.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates Digest authentication challenge parsing to avoid copying directive names into a local buffer by switching to curlx_str_* parsing helpers and struct Curl_str views.
Changes:
- Change
Curl_auth_digest_get_pair()to return the directive name viastruct Curl_strinstead of a fixed-sizechar[]buffer. - Replace manual blank-skipping and string comparisons with
curlx_str_passblanks()andcurlx_str_casecompare(). - Add
curlx/strparse.hinclude where needed for the new parsing helpers.
File summaries
| File | Description |
|---|---|
| lib/vauth/digest.h | Updates Curl_auth_digest_get_pair() signature to use struct Curl_str *. |
| lib/vauth/digest.c | Refactors digest challenge parsing to use curlx_str_* helpers and Curl_str comparisons. |
| lib/vauth/digest_sspi.c | Refactors SSPI digest parsing similarly and adds curlx/strparse.h. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Analysis of PR #22831 at 9fcfa933: Test ../../tests/http/test_19_shutdown.py::TestShutdown::test_19_03_shutdown_by_server[http/1.1] failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 2 different CI jobs (the link just goes to one of them). Note that this CI job has had a number of other flaky tests recently (2, to be specific) so it may be that this failure is rather a systemic issue with this job and not with this specific PR. Generated by Testclutch |
Use of curlx_str_ functions avoids having a copy.