diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bae1de8..42021f25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Unreleased + * Use the same data in CONNECT and Host header for proxied requests (#967) * Set default scheme in proxy uri (#966) * Redact URI and Location header on debug level (#964) * Downgrade all logging to debug and below (#964) diff --git a/src/proxy.rs b/src/proxy.rs index 29fac44f..c80ff9af 100644 --- a/src/proxy.rs +++ b/src/proxy.rs @@ -244,7 +244,7 @@ impl Connector for ConnectProxyConnector { .unwrap_or(proxied.scheme().unwrap().default_port().unwrap()); write!(w, "CONNECT {}:{} HTTP/1.1\r\n", proxied_host, proxied_port)?; - write!(w, "Host: {}:{}\r\n", proxy.host(), proxy.port())?; + write!(w, "Host: {}:{}\r\n", proxied_host, proxied_port)?; if let Some(v) = details.config.user_agent().as_str(DEFAULT_USER_AGENT) { write!(w, "User-Agent: {}\r\n", v)?; }