From 054901548265f48929974e53bd263a995598ae38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=A1=A0=E1=A0=B5=E1=A1=A0=E1=A1=B3=20=E1=A1=A0=E1=A0=B5?= =?UTF-8?q?=E1=A1=A0=20=E1=A0=AE=E1=A0=A0=E1=A0=A8=E1=A1=A9=E1=A0=8B?= =?UTF-8?q?=E1=A0=A0=E1=A0=A8?= <125150101+UjuiUjuMandan@users.noreply.github.com> Date: Tue, 16 Jan 2024 00:11:52 +0800 Subject: [PATCH] Fix listen address cannot be IPv6 --- accesser/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accesser/__init__.py b/accesser/__init__.py index 894bb8e..aedf00d 100644 --- a/accesser/__init__.py +++ b/accesser/__init__.py @@ -98,7 +98,7 @@ async def handle(reader, writer): with closing(writer): raw_request = await reader.readuntil(b'\r\n\r\n') requestline = raw_request.decode('iso-8859-1').splitlines()[0] - i_addr, i_port = writer.get_extra_info('peername') + i_addr, i_port, *_ = writer.get_extra_info('peername') logger.debug(f"{i_addr}:{i_port} say: {requestline}") words = requestline.split() command, path = words[:2]