From f657bf8caeefa07467e4dfaac673bbc59cbaaf83 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Thu, 16 Dec 2021 13:54:17 +0000 Subject: [PATCH] Add missing proxy_header to forward proxy case --- httpcore/_async/http_proxy.py | 1 + httpcore/_sync/http_proxy.py | 1 + 2 files changed, 2 insertions(+) diff --git a/httpcore/_async/http_proxy.py b/httpcore/_async/http_proxy.py index d24e88c2a..ee64d3132 100644 --- a/httpcore/_async/http_proxy.py +++ b/httpcore/_async/http_proxy.py @@ -101,6 +101,7 @@ def create_connection(self, origin: Origin) -> AsyncConnectionInterface: if origin.scheme == b"http": return AsyncForwardHTTPConnection( proxy_origin=self._proxy_url.origin, + proxy_headers=self._proxy_headers, keepalive_expiry=self._keepalive_expiry, network_backend=self._network_backend, ) diff --git a/httpcore/_sync/http_proxy.py b/httpcore/_sync/http_proxy.py index ac07273a4..d00b4d4f0 100644 --- a/httpcore/_sync/http_proxy.py +++ b/httpcore/_sync/http_proxy.py @@ -101,6 +101,7 @@ def create_connection(self, origin: Origin) -> ConnectionInterface: if origin.scheme == b"http": return ForwardHTTPConnection( proxy_origin=self._proxy_url.origin, + proxy_headers=self._proxy_headers, keepalive_expiry=self._keepalive_expiry, network_backend=self._network_backend, )