Subject: [PATCH v2 0/1] http: reject unsupported proxy URL schemes

From: [email-masked]
Date: Tue, 5 May 2026 09:19:39 +0000

From: Aliwoto <[email-masked]>

An explicit proxy URL with an unsupported scheme such as
htpp://127.0.0.1 is currently accepted and treated as an HTTP proxy.

This happens because Git parses the URL, extracts the host part, and
passes only that host to libcurl without rejecting the unsupported
scheme. As a result, the typo is silently accepted.

This patch rejects explicit unsupported proxy schemes while keeping the
existing host:port-without-scheme behavior unchanged, and adds a
regression test for the unsupported-scheme case.

---
Changes in v2:
- make SOCKS proxy type handling table-driven
- use test_must_fail in the regression test
- use test_grep on the essential error text

Aliwoto (1):
  http: reject unsupported proxy URL schemes

 http.c                | 93 +++++++++++++++++++++++++++++++------------
 t/t5564-http-proxy.sh |  6 +++
 2 files changed, 74 insertions(+), 25 deletions(-)

base-commit: 67ad42147a7acc2af6074753ebd03d904476118f
-- 
2.49.0.windows.1