Skip to content

http: accept https:// proxies again#2161

Open
dscho wants to merge 1 commit into
gitgitgadget:aw/validate-proxy-url-schemefrom
dscho:fix-bug-in-validate-proxy-url-scheme
Open

http: accept https:// proxies again#2161
dscho wants to merge 1 commit into
gitgitgadget:aw/validate-proxy-url-schemefrom
dscho:fix-bug-in-validate-proxy-url-scheme

Conversation

@dscho

@dscho dscho commented Jun 27, 2026

Copy link
Copy Markdown
Member

Cc: Aliwoto aminnimaj@gmail.com

Since 663d7ab (http: reject unsupported proxy URL schemes,
2026-05-05), set_curl_proxy_type() returns 0 only for the "http"
and SOCKS variants via dedicated early returns, and -1 for
everything else. The "https" branch configures the CURL handle for
HTTPS proxying but then falls through to the trailing `return -1`
intended for unknown schemes, so the caller in get_curl_handle()
treats a perfectly valid https:// proxy URL as unsupported and
refuses to use it.

Noticed while looking into a Coverity report against the same
function; the unchecked curl_easy_setopt() return values it flags
are orthogonal to this fix.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho self-assigned this Jun 27, 2026
@dscho

dscho commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

/submit

@gitgitgadget

gitgitgadget Bot commented Jun 27, 2026

Copy link
Copy Markdown

Submitted as pull.2161.git.1782580676734.gitgitgadget@gmail.com

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git/ pr-2161/dscho/fix-bug-in-validate-proxy-url-scheme-v1

To fetch this version to local tag pr-2161/dscho/fix-bug-in-validate-proxy-url-scheme-v1:

git fetch --no-tags https://github.com/gitgitgadget/git/ tag pr-2161/dscho/fix-bug-in-validate-proxy-url-scheme-v1

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant