From f3de69f6978bdab78e0ff6085c0c8603ce105ea9 Mon Sep 17 00:00:00 2001 From: tb Date: Tue, 23 Apr 2024 09:09:29 +0000 Subject: [PATCH] sync with ftp/fetch.c r1.218: send host header for proxies ok claudio --- usr.sbin/rpki-client/http.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/rpki-client/http.c b/usr.sbin/rpki-client/http.c index fdf57974f38..157e753f712 100644 --- a/usr.sbin/rpki-client/http.c +++ b/usr.sbin/rpki-client/http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: http.c,v 1.83 2024/04/17 14:01:17 claudio Exp $ */ +/* $OpenBSD: http.c,v 1.84 2024/04/23 09:09:29 tb Exp $ */ /* * Copyright (c) 2020 Nils Fisher * Copyright (c) 2020 Claudio Jeker @@ -1162,7 +1162,8 @@ proxy_connect(struct http_connection *conn) conn->bufpos = 0; /* XXX handle auth */ if ((r = asprintf(&conn->buf, "CONNECT %s HTTP/1.1\r\n" - "User-Agent: " HTTP_USER_AGENT "\r\n%s\r\n", host, + "Host: %s\r\n" + "User-Agent: " HTTP_USER_AGENT "\r\n%s\r\n", host, host proxy.proxyauth)) == -1) err(1, NULL); conn->bufsz = r; -- 2.20.1