diff options
author | Guido van Rossum <guido@python.org> | 2001-04-15 20:47:33 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-04-15 20:47:33 (GMT) |
commit | b8bf3bece2e30b9402fc3c48c134c59903952c21 (patch) | |
tree | 6118cdd8cb5530da58ac05c5fb34718bb82607be /Lib/urllib.py | |
parent | 9c7eab82b3ccf25dda907bf5680d70d4d68a24b8 (diff) | |
download | cpython-b8bf3bece2e30b9402fc3c48c134c59903952c21.zip cpython-b8bf3bece2e30b9402fc3c48c134c59903952c21.tar.gz cpython-b8bf3bece2e30b9402fc3c48c134c59903952c21.tar.bz2 |
Fix SF bug [ #416231 ] urllib.basejoin fails to apply some ../.
Reported by Juan M. Bello Rivas.
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r-- | Lib/urllib.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py index 3175199..53005c8 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 |