[Python-checkins] CVS: python/dist/src/Lib urllib.py,1.125,1.126
Guido van Rossum
gvanrossum@users.sourceforge.net
Sun, 15 Apr 2001 13:47:35 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv2045
Modified Files:
urllib.py
Log Message:
Fix SF bug [ #416231 ] urllib.basejoin fails to apply some ../.
Reported by Juan M. Bello Rivas.
Index: urllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v
retrieving revision 1.125
retrieving revision 1.126
diff -C2 -r1.125 -r1.126
*** urllib.py 2001/04/09 14:54:21 1.125
--- urllib.py 2001/04/15 20:47:33 1.126
***************
*** 864,867 ****
--- 864,869 ----
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