From b8bf3bece2e30b9402fc3c48c134c59903952c21 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sun, 15 Apr 2001 20:47:33 +0000 Subject: [PATCH] Fix SF bug [ #416231 ] urllib.basejoin fails to apply some ../. Reported by Juan M. Bello Rivas. --- Lib/urllib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/urllib.py b/Lib/urllib.py index 3175199a96..53005c8d8d 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 -- 2.49.0