From a0521ab4e4ab7f5a49fb53df3b57416e72150707 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 14 Apr 2020 13:44:26 +0000 Subject: [PATCH] Fix http diagnosis in IPv6 --- yunodiagnoser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yunodiagnoser.py b/yunodiagnoser.py index 381ce2f..90bf38d 100644 --- a/yunodiagnoser.py +++ b/yunodiagnoser.py @@ -174,6 +174,9 @@ async def check_http(request): # Run the actual check # # ############################################# # + if ":" in ip: + ip = "[%s]" % ip + async with aiohttp.ClientSession() as session: try: url = "http://" + ip + "/.well-known/ynh-diagnosis/" + nonce