-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Empty host crashes aiohttp #510
Copy link
Copy link
Closed
Labels
Description
Hello,
The following line produce a crash :
response = yield from aiohttp.get("http://:8001/crash")The stack trace is the following :
File "/usr/lib/python3.4/asyncio/tasks.py", line 238, in _step
result = next(coro)
File "/usr/lib/python3.4/site-packages/aiohttp/client.py", line 474, in get
ret = yield from request(hdrs.METH_GET, url, **kwargs)
File "/usr/lib/python3.4/site-packages/aiohttp/client.py", line 466, in request
read_until_eof=read_until_eof)
File "/usr/lib/python3.4/site-packages/aiohttp/client.py", line 129, in request
loop=self._loop, response_class=self._response_class)
File "/usr/lib/python3.4/site-packages/aiohttp/client_reqrep.py", line 77, in __init__
self.update_host(url)
File "/usr/lib/python3.4/site-packages/aiohttp/client_reqrep.py", line 118, in update_host
host = host.encode('idna').decode('utf-8')
AttributeError: 'NoneType' object has no attribute 'encode'
Reactions are currently unavailable