fix norming

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2676 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2005-06-23 16:21:05 +00:00
parent 217d34bb54
commit 0c3e78569c

View file

@ -329,8 +329,11 @@ class UrlBase (object):
self.url = urljoin(self.parent_url, base_url, self.scheme)
else:
self.url = base_url
# note: urljoin can unnorm the url, so norm the url
self.url, is_idn = linkcheck.url.url_norm(self.url)
# note: urljoin can unnorm the url path, so norm it again
urlparts = list(urlparse.urlsplit(self.url))
if urlparts[2]:
urlparts[2] = linkcheck.url.collapse_segments(urlparts[2])
self.url = urlparse.urlunsplit(urlparts)
# split into (modifiable) list
self.urlparts = linkcheck.strformat.url_unicode_split(self.url)
# and unsplit again