summaryrefslogtreecommitdiffstats
path: root/manifest_xml.py
diff options
context:
space:
mode:
Diffstat (limited to 'manifest_xml.py')
-rw-r--r--manifest_xml.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index 3517c151..6d70c86b 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -86,16 +86,20 @@ class _XmlRemote(object):
86 # about here are: 86 # about here are:
87 # * no scheme in the base url, like <hostname:port> 87 # * no scheme in the base url, like <hostname:port>
88 # * persistent-https:// 88 # * persistent-https://
89 # * rpc://
89 # We handle this by replacing these with obscure protocols 90 # We handle this by replacing these with obscure protocols
90 # and then replacing them with the original when we are done. 91 # and then replacing them with the original when we are done.
91 # gopher -> <none> 92 # gopher -> <none>
92 # wais -> persistent-https 93 # wais -> persistent-https
94 # nntp -> rpc
93 if manifestUrl.find(':') != manifestUrl.find('/') - 1: 95 if manifestUrl.find(':') != manifestUrl.find('/') - 1:
94 manifestUrl = 'gopher://' + manifestUrl 96 manifestUrl = 'gopher://' + manifestUrl
95 manifestUrl = re.sub(r'^persistent-https://', 'wais://', manifestUrl) 97 manifestUrl = re.sub(r'^persistent-https://', 'wais://', manifestUrl)
98 manifestUrl = re.sub(r'^rpc://', 'nntp://', manifestUrl)
96 url = urllib.parse.urljoin(manifestUrl, url) 99 url = urllib.parse.urljoin(manifestUrl, url)
97 url = re.sub(r'^gopher://', '', url) 100 url = re.sub(r'^gopher://', '', url)
98 url = re.sub(r'^wais://', 'persistent-https://', url) 101 url = re.sub(r'^wais://', 'persistent-https://', url)
102 url = re.sub(r'^nntp://', 'rpc://', url)
99 return url 103 return url
100 104
101 def ToRemoteSpec(self, projectName): 105 def ToRemoteSpec(self, projectName):