From 1604e20fc87ce212cf3a02474a6d7509b640cbbb Mon Sep 17 00:00:00 2001 From: flysee Date: Wed, 7 Dec 2022 11:24:22 +0000 Subject: [PATCH] Fix the proxy_bypass_registry function all returning true in some cases. --- src/requests/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/requests/utils.py b/src/requests/utils.py index a603a863..90679045 100644 --- a/src/requests/utils.py +++ b/src/requests/utils.py @@ -97,6 +97,8 @@ if sys.platform == "win32": # '' string by the localhost entry and the corresponding # canonical entry. proxyOverride = proxyOverride.split(";") + # filter out empty strings to avoid re.match all true. + proxyOverride = filter(None, proxyOverride) # now check if we match one of the registry values. for test in proxyOverride: if test == "":