[Python-checkins] CVS: python/dist/src/Lib urllib.py,1.112,1.113
Guido van Rossum
gvanrossum@users.sourceforge.net
Thu, 18 Jan 2001 19:28:17 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv13176
Modified Files:
urllib.py
Log Message:
Anonymous SF bug 129288: "The python 2.0 urllib has %%%x as a format
when quoting forbidden characters. There are scripts out there that
break with lower case, therefore I guess %%%X should be used."
I agree, so am fixing this.
Index: urllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v
retrieving revision 1.112
retrieving revision 1.113
diff -C2 -r1.112 -r1.113
*** urllib.py 2001/01/15 18:31:13 1.112
--- urllib.py 2001/01/19 03:28:15 1.113
***************
*** 1050,1054 ****
c = res[i]
if not _fast_safe.has_key(c):
! res[i] = '%%%02x' % ord(c)
return ''.join(res)
--- 1050,1054 ----
c = res[i]
if not _fast_safe.has_key(c):
! res[i] = '%%%02X' % ord(c)
return ''.join(res)
***************
*** 1081,1085 ****
c = res[i]
if c not in safe:
! res[i] = '%%%02x' % ord(c)
return ''.join(res)
--- 1081,1085 ----
c = res[i]
if c not in safe:
! res[i] = '%%%02X' % ord(c)
return ''.join(res)