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

Reported by Juan M. Bello Rivas.
This commit is contained in:
Guido van Rossum 2001-04-15 20:47:33 +00:00
parent 9c7eab82b3
commit b8bf3bece2

View file

@ -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