### Checklist - [* ] The bug is reproducible against the latest release and/or `master`. - [* ] There are no similar issues or pull requests to fix it yet. ### Describe the bug As of version httpx 0.12.1, sync client send multiple host headers when proxied. ### To reproduce ```` import httpx proxies = { "http": "http://127.0.0.1:8080/" } with httpx.Client(proxies=proxies) as client: client.get('http://ec2-18-sdl-1.compute.amazonaws.com:8080/items') ```` ### Expected behavior There must be only one host header, as some servers (for example uvicorn) will reject requests otherwise. ### Actual behavior Headers host and Host are set. ### Debugging material The second Host header is set in poolmanager._set_proxy_headers() ### Environment - OS: Windows - Python version: 3.6.8 - HTTPX version: 0.12.1 - Async environment: No - HTTP proxy: yes - Custom certificates: No
Activity
florimondmanca commentedon May 2, 2020
Hi!
Can you confirm if this is reproducible against the 0.13dev0 pre release issued yesterday?
0.13 switches to our own sync implementation instead of urllib3, which means this might be fixed now as we aligned the sync impl on the async one.
yeraydiazdiaz commentedon May 5, 2020
I can't reproduce this on 0.13.0.dev0 or master.