We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Requests to a URL containing an IPv6 address while using a proxy results in a malformed CONNECT request.
CONNECT
The request should make it through the proxy and reach the IPv6 server.
The proxy is returning an error (400, Bad request).
async with aiohttp.request( 'get', 'https://[2320:10a:c081:56::363]:443/testing.txt', proxy="http://whatever:8080", ) as response: print(response)
tcpdump shows (notice the missing brackets):
CONNECT 2320:10a:c081:56::363:443 HTTP/1.1 Host: [2320:10a:c081:56::363] Accept: */* Accept-Encoding: gzip, deflate User-Agent: Python/3.6 aiohttp/3.5.4
I patched https://github.com/aio-libs/aiohttp/blob/master/aiohttp/client_reqrep.py#L543 to add the brackets and confirmed that the request is going through.
aiohttp/3.5.4 (client) CentOS 7.5
The text was updated successfully, but these errors were encountered:
fix missing brackets for IPv6 in proxy CONNECT request
e6d0afd
aio-libs#3841
Fix missing brackets for IPv6 in proxy CONNECT request
bfc53b3
I think there have been some fixes for IPv6, can you retest on the latest release?
Sorry, something went wrong.
No branches or pull requests
Long story short
Requests to a URL containing an IPv6 address while using a proxy results in a malformed
CONNECT
request.Expected behaviour
The request should make it through the proxy and reach the IPv6 server.
Actual behaviour
The proxy is returning an error (400, Bad request).
Steps to reproduce
tcpdump shows (notice the missing brackets):
I patched https://github.com/aio-libs/aiohttp/blob/master/aiohttp/client_reqrep.py#L543 to add the brackets and confirmed that the request is going through.
Your environment
aiohttp/3.5.4 (client)
CentOS 7.5
The text was updated successfully, but these errors were encountered: