Skip to content

When using proxy the request downgrades to HTTP/1 #1992

Closed

Description

@biplovdahal

Using the following code

client = httpx.Client(http2=True, proxies=proxies)
 response = client.get('https://www.truepeoplesearch.com/results?name=John', headers=headers)
response.http_version

It appears that it returns HTTP/1

but if I were to make the same request without proxy, it shows HTTP/2

Version of HTTPX being used.

Name: httpx
Version: 0.21.1
Summary: The next generation HTTP client.
Home-page: https://github.com/encode/httpx
Author: Tom Christie
Author-email: tom@tomchristie.com

Activity

  1. knu-code commented on Dec 30, 2021

    @knu-code

    Same problem in httpx 0.21.1. I try the socks5 and http proxy, and they all failed. But I can get normal http2 response via Chrome using proxy. So weird.

  2. biplovdahal commented on Dec 30, 2021

    @biplovdahal
    Author

    @yofeng2021 Yes, same with me. I was able to load proxy via chrome and the request went through HTTP/2. I think the issue stands with the library httpx itself. I recall this was working couple months ago, all of a sudden it stopped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions