mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-21 22:54:45 +00:00
add url_unsplit method
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3029 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
5a4f1248c3
commit
1df673a79d
1 changed files with 6 additions and 0 deletions
|
|
@ -459,6 +459,12 @@ def url_split (url):
|
|||
return scheme, host, port, document
|
||||
|
||||
|
||||
def url_unsplit (parts):
|
||||
if parts[2] == default_ports.get(parts[0]):
|
||||
return "%s://%s%s" % (parts[0], parts[1], parts[3])
|
||||
return "%s://%s:%d%s" % parts
|
||||
|
||||
|
||||
def splitport (host, port=80):
|
||||
"""
|
||||
Split optional port number from host. If host has no port number,
|
||||
|
|
|
|||
Loading…
Reference in a new issue