diff options
Diffstat (limited to 'Lib/urllib/parse.py')
-rw-r--r-- | Lib/urllib/parse.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py index 31fd7e16ee..34d5f95dd7 100644 --- a/Lib/urllib/parse.py +++ b/Lib/urllib/parse.py @@ -1056,9 +1056,9 @@ def _splitport(host): """splitport('host:port') --> 'host', 'port'.""" global _portprog if _portprog is None: - _portprog = re.compile('(.*):([0-9]*)$', re.DOTALL) + _portprog = re.compile('(.*):([0-9]*)', re.DOTALL) - match = _portprog.match(host) + match = _portprog.fullmatch(host) if match: host, port = match.groups() if port: |