HTTP version is not honored when using a proxy #1960
-
|
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 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
|
Correct. At this point in time we should simply document that proxy HTTP requests always use HTTP/1.1. |
Beta Was this translation helpful? Give feedback.
-
|
Hi, The following PRs resolved that issue.
They are waiting feedbacks since May 2021. Thanks |
Beta Was this translation helpful? Give feedback.
-
|
Resolved from 0.2.12 onwards. |
Beta Was this translation helpful? Give feedback.
Resolved from 0.2.12 onwards.