Commit b8bf3bec authored by Guido van Rossum's avatar Guido van Rossum

Fix SF bug [ #416231 ] urllib.basejoin fails to apply some ../.

Reported by Juan M. Bello Rivas.
parent 9c7eab82
......@@ -863,6 +863,8 @@ def basejoin(base, url):
basepath = ''
path = basepath + path
if host and path and path[0] != '/':
path = '/' + path
if type and host: return type + '://' + host + path
elif type: return type + ':' + path
elif host: return '//' + host + path # don't know what this means
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment