Skip to content

Commit 7daf325

Browse files
committed
http: accept https:// proxies again
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>
1 parent 663d7ab commit 7daf325

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

http.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,8 @@ static int set_curl_proxy_type(CURL *result, const char *protocol)
802802
if (has_proxy_cert_password())
803803
curl_easy_setopt(result, CURLOPT_PROXY_KEYPASSWD,
804804
proxy_cert_auth.password);
805+
806+
return 0;
805807
}
806808

807809
return -1;

0 commit comments

Comments
 (0)