Skip to content

setopt: changing the proxy port is also a proxy change#21485

Closed
bagder wants to merge 3 commits into
masterfrom
bagder/proxyport
Closed

setopt: changing the proxy port is also a proxy change#21485
bagder wants to merge 3 commits into
masterfrom
bagder/proxyport

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented May 2, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates libcurl's proxy option handling so changing CURLOPT_PROXYPORT is treated like changing the proxy itself, resetting cached proxy authentication state in lib/setopt.c. It fits into the setopt path that prepares per-handle proxy configuration and auth state before transfers.

Changes:

  • Introduces a shared changeproxy() helper to clear cached proxy Digest/auth state.
  • Calls that helper when CURLOPT_PROXYPORT changes, not just when the proxy string changes.
  • Refactors the proxy-specific setopt_long_proxy() preprocessor layout slightly while keeping the no-proxy-disabled stub.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/setopt.c
Comment thread lib/setopt.c
@github-actions github-actions Bot added the tests label May 2, 2026
@bagder bagder marked this pull request as ready for review May 2, 2026 21:28
@bagder bagder closed this in f59733b May 3, 2026
@bagder bagder deleted the bagder/proxyport branch May 3, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants