[Python-checkins] CVS: python/dist/src/Lib urllib.py,1.124,1.125

Moshe Zadka moshez@users.sourceforge.net
2001年4月09日 07:54:23 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv10958/Lib
Modified Files:
	urllib.py 
Log Message:
fixing 408085 - redirect from https becomes http
Even though relative redirects are illegal, they are common
urllib treated every relative redirect as though it was to http,
even if the original was https://
As long as we're compensating for server bugs, might as well do
it properly.
Index: urllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v
retrieving revision 1.124
retrieving revision 1.125
diff -C2 -r1.124 -r1.125
*** urllib.py	2001年03月13日 19:47:16	1.124
--- urllib.py	2001年04月09日 14:54:21	1.125
***************
*** 557,561 ****
 fp.close()
 # In case the server sent a relative URL, join with original:
! newurl = basejoin("http:" + url, newurl)
 if data is None:
 return self.open(newurl)
--- 557,561 ----
 fp.close()
 # In case the server sent a relative URL, join with original:
! newurl = basejoin(self.type + ":" + url, newurl)
 if data is None:
 return self.open(newurl)

AltStyle によって変換されたページ (->オリジナル) /