WebBrowser/SafeBrowsing/SafeBrowsingUrl.py

branch
safe_browsing
changeset 5829
d3448873ced3
parent 5817
a5f6c9128500
child 5832
28f36b9c925f
equal deleted inserted replaced
5821:6c7766cde4c1 5829:d3448873ced3
106 query = urlParts.query 106 query = urlParts.query
107 if not query and '?' not in url: 107 if not query and '?' not in url:
108 query = None 108 query = None
109 if not path: 109 if not path:
110 path = '/' 110 path = '/'
111 hasTrailingSlash = (path[-1] == '/')
112 path = posixpath.normpath(path).replace('//', '/') 111 path = posixpath.normpath(path).replace('//', '/')
113 if hasTrailingSlash and path[-1] != '/': 112 if path[-1] != '/':
114 path += '/' 113 path += '/'
115 port = urlParts.port 114 port = urlParts.port
116 host = host.strip('.') 115 host = host.strip('.')
117 host = re.sub(r'\.+', '.', host).lower() 116 host = re.sub(r'\.+', '.', host).lower()
118 if host.isdigit(): 117 if host.isdigit():

eric ide

mercurial