We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e486f93 commit 382ddd7Copy full SHA for 382ddd7
1 file changed
Lib/urllib/parse.py
@@ -544,7 +544,7 @@ def _check_bracketed_netloc(netloc):
544
# Valid bracketed hosts are defined in
545
# https://www.rfc-editor.org/rfc/rfc3986#page-49 and https://url.spec.whatwg.org/
546
def _check_bracketed_host(hostname):
547
- if hostname[0].lower() == 'v':
+ if len(hostname) > 0 and hostname[0].lower() == 'v':
548
if not re.match(r"\A[vV][a-fA-F0-9]+\..+\Z", hostname):
549
raise ValueError(f"IPvFuture address is invalid")
550
else:
0 commit comments