Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,  Aliwoto <aminnimaj@gmail.com>,
	 Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH] http: accept https:// proxies again
Date: Sat, 27 Jun 2026 18:54:36 -0700	[thread overview]
Message-ID: <xmqq8q7z4eg3.fsf@gitster.g> (raw)
In-Reply-To: <pull.2161.git.1782580676734.gitgitgadget@gmail.com> (Johannes Schindelin via GitGitGadget's message of "Sat, 27 Jun 2026 17:17:56 +0000")

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
writes:

>  http.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/http.c b/http.c
> index 8e5a4d8bcf..8c0f831365 100644
> --- a/http.c
> +++ b/http.c
> @@ -802,6 +802,8 @@ static int set_curl_proxy_type(CURL *result, const char *protocol)
>  		if (has_proxy_cert_password())
>  			curl_easy_setopt(result, CURLOPT_PROXY_KEYPASSWD,
>  					 proxy_cert_auth.password);
> +
> +		return 0;
>  	}
>  
>  	return -1;

That lack of "return 0" is so glaringly obvious when you point it
out like this patch does, and it is surprising it has been missed
initially.

From this function nothing returns an error anymore, and looking at
the preimage of 663d7abe (http: reject unsupported proxy URL
schemes, 2026-05-05) that is the source of the bug, the original did
not do anything when the corresponding code did not find and set any
proxy settings, either.

So perhaps it is a better fix to make it just a function that
returns void with early returns?

Thanks.

      reply	other threads:[~2026-06-28  1:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-27 17:17 [PATCH] http: accept https:// proxies again Johannes Schindelin via GitGitGadget
2026-06-28  1:54 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq8q7z4eg3.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=aminnimaj@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox