[Python-checkins] python/dist/src/Lib urlparse.py,1.33,1.34
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Mon, 14 Oct 2002 12:56:05 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv3677
Modified Files:
urlparse.py
Log Message:
Fix for 1.33: urlsplit() should only add '//' if scheme != ''.
Will add test and backport.
Index: urlparse.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urlparse.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** urlparse.py 25 Sep 2002 19:20:10 -0000 1.33
--- urlparse.py 14 Oct 2002 19:56:03 -0000 1.34
***************
*** 129,133 ****
def urlunsplit((scheme, netloc, url, query, fragment)):
! if netloc or (scheme in uses_netloc and url[:2] != '//'):
if url and url[:1] != '/': url = '/' + url
url = '//' + (netloc or '') + url
--- 129,133 ----
def urlunsplit((scheme, netloc, url, query, fragment)):
! if netloc or (scheme and scheme in uses_netloc and url[:2] != '//'):
if url and url[:1] != '/': url = '/' + url
url = '//' + (netloc or '') + url