From: Guido van Rossum Date: Sun, 15 Apr 2001 20:47:33 +0000 (+0000) Subject: Fix SF bug [ #416231 ] urllib.basejoin fails to apply some ../. X-Git-Tag: v2.1c2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b8bf3bece2e30b9402fc3c48c134c59903952c21;p=thirdparty%2FPython%2Fcpython.git Fix SF bug [ #416231 ] urllib.basejoin fails to apply some ../. Reported by Juan M. Bello Rivas. --- diff --git a/Lib/urllib.py b/Lib/urllib.py index 3175199a96ab..53005c8d8d5a 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -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