git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
aminnimaj@gmail.com <aminnimaj@gmail.com>
Date
May 5, 2026, 09:19 UTC
Message-ID
<20260505091941.1825-1-aminnimaj@gmail.com>
In-Reply-To
<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.

---
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
Previous: Junio C HamanoNext: aminnimaj@gmail.com
Message 4 of 5 in “http: reject unsupported proxy URL schemes”
  1. 0/1 http: reject unsupported proxy URL schemesaminnimaj@gmail.com, May 1, 2026
  2. 1/1 http: reject unsupported proxy URL schemesaminnimaj@gmail.com, May 1, 2026
  3. Junio C HamanoMay 3, 2026
  4. 0/1 http: reject unsupported proxy URL schemesaminnimaj@gmail.com, May 5, 2026
  5. 1/1 http: reject unsupported proxy URL schemesaminnimaj@gmail.com, May 5, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.