Skip to content

url_match_destination fix#21573

Closed
icing wants to merge 2 commits into
curl:masterfrom
icing:url_match_destination_fix
Closed

url_match_destination fix#21573
icing wants to merge 2 commits into
curl:masterfrom
icing:url_match_destination_fix

Conversation

@icing

@icing icing commented May 12, 2026

Copy link
Copy Markdown
Contributor

Match origin/via_peer also for non-SSL schemes.

Copilot AI left a comment

Copy link
Copy Markdown

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 adjusts connection reuse matching in url_match_destination() to also require origin/via_peer destination equality for non-SSL schemes.

Changes:

  • Moves the origin/via_peer destination comparison so it runs unconditionally (instead of only under the TLS / non-proxy / tunnel-proxy conditional).

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

Comment thread lib/url.c Outdated
icing added 2 commits May 13, 2026 12:18
Match origin/via_peer also for non-SSL schemes.
Add test case for connection reuse against http: proxy (no tunnel)
Fix `url_match_destination()` by
- handling http: proxy case explicitly
- handling scheme differences irregardless of TLS flag in needle
- evaluating `url_match_ssl_use()` on scheme differences (was
  a separate call in the "match chain" before)
- only comparing hostname/port of origin otherwise
@icing icing force-pushed the url_match_destination_fix branch from c62bf3b to fc9d96b Compare May 13, 2026 11:07
@github-actions github-actions Bot added the tests label May 13, 2026
@icing

icing commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

Reworked the logic after adding a test case for http: proxy connection reuse. Knew there was something amiss yesterday.

@icing icing requested a review from bagder May 13, 2026 11:30
@bagder bagder closed this in 91dcf4e May 15, 2026
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
Match origin/via_peer also for non-SSL schemes.

Closes curl#21573
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants