From c23b9b41f61c4076be40f506a577d89ec97dd904 Mon Sep 17 00:00:00 2001 From: Eric Karge Date: Thu, 11 Jun 2026 10:37:48 +0200 Subject: [PATCH] lib/fetch: Add HTTP `Host` header to CONNECT requests --- lib/fetch/http.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/fetch/http.c b/lib/fetch/http.c index 2e48a736..da1317da 100644 --- a/lib/fetch/http.c +++ b/lib/fetch/http.c @@ -753,6 +753,8 @@ http_connect(struct url *URL, struct url *purl, const char *flags, int *cached) if (strcasecmp(URL->scheme, SCHEME_HTTPS) == 0 && purl) { http_cmd(conn, "CONNECT %s:%d HTTP/1.1\r\n", URL->host, URL->port); + http_cmd(conn, "Host: %s:%d\r\n", + URL->host, URL->port); send_proxy_headers(conn, purl);