[PATCH 0/1] http: reject unsupported proxy URL schemes
- From
aminnimaj@gmail.com <aminnimaj@gmail.com>
- Date
- May 1, 2026, 19:04 UTC
- Message-ID
- <20260501190401.1580-1-aminnimaj@gmail.com>
From: Aliwoto <aminnimaj@gmail.com>
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.
Aliwoto (1): http: reject unsupported proxy URL schemes
http.c | 79 +++++++++++++++++++++++++++++-------------- t/t5564-http-proxy.sh | 5 +++ 2 files changed, 59 insertions(+), 25 deletions(-)
base-commit: 67ad42147a7acc2af6074753ebd03d904476118f
-- 2.49.0.windows.1