From a48ecdb1915151a6e9020e5a776fdef3d618c6cc Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Tue, 11 Feb 2025 17:15:16 +0000 Subject: [PATCH] Update aiohttp/client_reqrep.py --- aiohttp/client_reqrep.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aiohttp/client_reqrep.py b/aiohttp/client_reqrep.py index 900a02f7086..d58c35a042a 100644 --- a/aiohttp/client_reqrep.py +++ b/aiohttp/client_reqrep.py @@ -953,7 +953,8 @@ def links(self) -> "MultiDictProxy[MultiDictProxy[Union[str, URL]]]": for val in re.split(r",(?=\s*<)", links_str): match = re.match(r"\s*<(.*)>(.*)", val) - assert match is not None + if match is None: # Malformed link + continue url, params_str = match.groups() params = params_str.split(";")[1:]