From a41cc32aeddd87d6fd9c3fabba4a64fbca00b875 Mon Sep 17 00:00:00 2001 From: Mahmoud Hashemi Date: Fri, 10 Mar 2017 22:51:07 -0800 Subject: [PATCH] urlutils: greatly expand default port map --- boltons/urlutils.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/boltons/urlutils.py b/boltons/urlutils.py index a12463e1..b793a161 100644 --- a/boltons/urlutils.py +++ b/boltons/urlutils.py @@ -80,9 +80,16 @@ 'imap', 'wais', 'file', 'mms', 'https', 'shttp', 'snews', 'prospero', 'rtsp', 'rtspu', 'rsync', '', 'svn', 'svn+ssh', 'sftp', 'nfs', 'git', 'git+ssh'] -NO_NETLOC_SCHEMES = ['urn', 'tel', 'news', 'mailto', 'magnet'] # TODO: others? - -DEFAULT_PORT_MAP = {'http': 80, 'https': 443} +NO_NETLOC_SCHEMES = ['urn', 'tel', 'news', 'mailto', 'magnet', 'about', 'blob', 'data'] # TODO: others? + +DEFAULT_PORT_MAP = {'acap': 674, 'afp': 548, 'dict': 2628, 'dns': 53, + 'file': None, 'ftp': 21, 'git': 9418, 'gopher': 70, + 'http': 80, 'https': 443, 'imap': 143, 'irc': 194, + 'ldap': 389, 'ldaps': 636, 'mms': 1755, 'nfs': 111, + 'nntp': 119, 'nntps': 563, 'prospero': 1525, 'rsync': 873, + 'rtsp': 554, 'rtsps': 322, 'rtspu': 5005, 'sftp': 22, + 'smb': 445, 'snmp': 161, 'ssh': 22, 'svn': 3690, + 'telnet': 23, 'wais': 210} DEFAULT_ENCODING = 'utf8'