Closed
Description
Long story short
ClientSession does not bracket the IPv6 addresses in the HOST header.
Expected behaviour
GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Host: [::1]:99
User-Agent: Python/3.6 aiohttp/3.5.0a0
Actual behaviour
GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Host: ::1:99
User-Agent: Python/3.6 aiohttp/3.5.0a0
Steps to reproduce
async with aiohttp.ClientSession() as client:
await client.get('http://[::1]:99')
Your environment
- aiohttp 3.5.0a0
- python 3.6
- ubuntu 16.04
- aiohttp client