From c72a3eb2eee117ec1815e795fd690343994562a3 Mon Sep 17 00:00:00 2001 From: Mihael Isaev Date: Tue, 6 Dec 2022 16:31:09 +0300 Subject: [PATCH] Fix `Host` header (#650) --- .../ChannelHandler/HTTP1ProxyConnectHandler.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/AsyncHTTPClient/ConnectionPool/ChannelHandler/HTTP1ProxyConnectHandler.swift b/Sources/AsyncHTTPClient/ConnectionPool/ChannelHandler/HTTP1ProxyConnectHandler.swift index 233405a1f..7e12a9ef2 100644 --- a/Sources/AsyncHTTPClient/ConnectionPool/ChannelHandler/HTTP1ProxyConnectHandler.swift +++ b/Sources/AsyncHTTPClient/ConnectionPool/ChannelHandler/HTTP1ProxyConnectHandler.swift @@ -165,7 +165,7 @@ final class HTTP1ProxyConnectHandler: ChannelDuplexHandler, RemovableChannelHand if (self.targetPort != self.scheme.defaultPort) { host += ":\(self.targetPort)" } - head.headers.replaceOrAdd(name: "host", value: host) + head.headers.add(name: "host", value: host) } if let authorization = self.proxyAuthorization { head.headers.replaceOrAdd(name: "proxy-authorization", value: authorization.headerValue)