url: detect proxy changes read from environment#21666
Conversation
|
Analysis of PR #21666 at a8605a04: Test 3207 failed, but it has been 1.4% flaky lately, so it's probably NOT a fault of the PR. Note that this test has failed in 4 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 (3, to be exact) so it may be that this failure is rather a systemic issue with this job and not with this specific PR. Generated by Testclutch |
There was a problem hiding this comment.
Pull request overview
This PR adds tracking for proxy changes (notably those coming from environment proxy detection) so libcurl can reset proxy Digest auth state when the proxy changes between transfers on the same easy handle. It also introduces a new libtest-based regression test case to exercise this behavior.
Changes:
- Track the last-used proxy string in
UrlStateand clearstate.proxydigestwhen the proxy changes. - Add new libtest
lib1630plus test spectest1630to validate proxy change handling across two transfers. - Wire the new test into the test build system.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/libtest/Makefile.inc | Adds lib1630.c to the libtest build. |
| tests/libtest/lib1630.c | New libtest that performs two transfers relying on env proxies and proxy Digest auth. |
| tests/data/test1630 | New test definition for the regression scenario. |
| tests/data/Makefile.am | Adds the new test case to the test list (currently duplicated). |
| lib/urldata.h | Adds UrlState.envproxy to track last proxy string. |
| lib/url.c | Frees envproxy on cleanup and clears proxy Digest state when proxy changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
and make sure Digest state is flushed in the second use
When a proxy is set from an environment variable, detect if that proxy is not the same as previously and flush state.
303401f to
a5a3988
Compare
|
augment review |
🤖 Augment PR SummarySummary: This PR makes libcurl detect when the effective proxy (as resolved from environment variables) changes between transfers, and resets proxy Digest auth state accordingly. Changes:
Technical Notes: The intent appears to be preventing proxy Digest state (nonce/realm/etc) from being reused after the proxy endpoint changes, which could otherwise cause incorrect/unsafe preemptive auth behavior. 🤖 Was this summary useful? React with 👍 or 👎 |
When a proxy is set from an environment variable, detect if that proxy is not the same as previously and flush state. Verified by test1647: verify changing proxy with env variables and make sure Digest state is flushed in the second use Closes curl#21666
No description provided.