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

Moshe Zadka moshez@users.sourceforge.net
Mon, 09 Apr 2001 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)