diff options
Diffstat (limited to 'Lib/http/client.py')
-rw-r--r-- | Lib/http/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py index 99d6a68cf4..f71a062d2b 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -1091,7 +1091,7 @@ class HTTPConnection: url = '/' # Prevent CVE-2019-9740. if match := _contains_disallowed_url_pchar_re.search(url): - raise ValueError(f"URL can't contain control characters. {url!r} " + raise InvalidURL(f"URL can't contain control characters. {url!r} " f"(found at least {match.group()!r})") request = '%s %s %s' % (method, url, self._http_vsn_str) |