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

This commit is contained in:
Stephan Erb 2009-11-04 23:46:16 +01:00
parent c1cbc07645
commit addaaa9242
1 changed files with 1 additions and 1 deletions

View File

@ -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: