Commit 4e8840fd195953af7a7fb2c61e46d6f177cbd81d

Edward Thomson 2021-08-30T18:20:35

Merge pull request #6022 from lollipopman/connect-proxy-host-header Set Host Header to match CONNECT authority target

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/transports/httpclient.c b/src/transports/httpclient.c
index d40c162..5b8949a 100644
--- a/src/transports/httpclient.c
+++ b/src/transports/httpclient.c
@@ -670,7 +670,7 @@ static int generate_connect_request(
 	git_buf_puts(buf, "\r\n");
 
 	git_buf_puts(buf, "Host: ");
-	puts_host_and_port(buf, &client->proxy.url, false);
+	puts_host_and_port(buf, &client->server.url, true);
 	git_buf_puts(buf, "\r\n");
 
 	if ((error = apply_proxy_credentials(buf, client, request) < 0))