Skip to content
Snippets Groups Projects
Commit addaaa92 authored by steve-e's avatar steve-e
Browse files

Fix regex used in urisplit. It failed to split the host:port part.

parent c1cbc076
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ def urisplit(uri):
return 443 as default port if proto is https else 80
'''
import re
regex = '(([^:/]+)(://))?([^/]*)(:)*([^/]*)(/?.*)'
regex = '(([^:/]+)(://))?([^:/]*)(:)?([^/]*)(/?.*)'
grouped = re.match(regex, uri).groups()
proto, host, port, path = grouped[1], grouped[3], grouped[5], grouped[6]
if not port:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment