Repository navigation
Conversation
CURLUSESSL_* needs a bit more special check on connection reuse. Except CURLUSESSL_TRY, we expect the reused connection to have exactly the same setting. On TRY, we are happy with anything that is no NONE.
bagder
approved these changes
Sep 4, 2026
There was a problem hiding this comment.
🟡 Changes recommended
The new/changed reuse semantics for CURLUSESSL_* are not backed by targeted test coverage, making regressions in a subtle connection-reuse area more likely.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR tightens FTP-family connection reuse matching around CURLOPT_USE_SSL/use_ssl, ensuring reused connections have compatible TLS-upgrade intent: exact matches for all modes except CURLUSESSL_TRY, which can reuse any connection configured for some SSL use (non-NONE).
Changes:
- Replace the prior
use_sslreuse assertion/ordering check with explicit matching rules. - Allow
CURLUSESSL_TRYtransfers to reuse any connection whoseuse_sslis notCURLUSESSL_NONE; require exact equality for other modes.
File summaries
| File | Description |
|---|---|
| lib/ftp.c | Updates FTP connection reuse matching logic for use_ssl to be stricter and explicit, with a special-case rule for CURLUSESSL_TRY. |
Review details
- Files reviewed: 1/1 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CURLUSESSL_* needs a bit more special check on
connection reuse. Except CURLUSESSL_TRY, we
expect the reused connection to have exactly
the same setting. On TRY, we are happy with
anything that is no NONE.