Skip to content

interceptors/http: fix version format#173

Merged
sarayourfriend merged 1 commit intoh2non:masterfrom
xrmx:fix-http-client-version
Mar 6, 2026
Merged

interceptors/http: fix version format#173
sarayourfriend merged 1 commit intoh2non:masterfrom
xrmx:fix-http-client-version

Conversation

@xrmx
Copy link
Contributor

@xrmx xrmx commented Mar 4, 2026

Description

The version is an int and not a tuple.

>>> import http.client
>>> host = "docs.python.org"
>>> conn = http.client.HTTPSConnection(host)
>>> conn.request("GET", "/3/", headers={"Host": host})
>>> response = conn.getresponse()
>>> response.version
11
>>> type(response.version)
<class 'int'>

PR Checklist

  • I've added tests for any code changes
  • I've documented any new features

The version is an int and not a tuple.

>>> import http.client
>>> host = "docs.python.org"
>>> conn = http.client.HTTPSConnection(host)
>>> conn.request("GET", "/3/", headers={"Host": host})
>>> response = conn.getresponse()
>>> response.version
11
>>> type(response.version)
<class 'int'>
@sarayourfriend sarayourfriend merged commit a15f6fb into h2non:master Mar 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants