HTTP version is not honored when using a proxy #1960
Answered
by
lovelydinosaur
AlecHaring
asked this question in
Potential Issue
|
Running this code: import httpx
def http_version_test(url):
# with proxy
with httpx.Client(http2=True,
proxies={"all://": f"http://127.0.0.1:8080"}) as client:
res = client.get(url)
print(f"With proxy: {res.http_version}")
# without proxy
with httpx.Client(http2=True) as client:
res = client.get(url)
print(f"Without proxy: {res.http_version}")
if __name__ == '__main__':
http_version_test('https://httpbin.org/get')Will output this: It seems like the problem arises in the |
Answered by
lovelydinosaur
Jan 10, 2022
Replies: 3 comments 4 replies
|
Correct. At this point in time we should simply document that proxy HTTP requests always use HTTP/1.1. |
4 replies
|
Hi, The following PRs resolved that issue.
They are waiting feedbacks since May 2021. Thanks |
0 replies
Answer selected by
lovelydinosaur
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Resolved from 0.2.12 onwards.