[Python-checkins] python/dist/src/Lib urllib.py,1.151,1.152

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Thu, 12 Sep 2002 13:14:07 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv15853

Modified Files:
	urllib.py 
Log Message:
When testing for localhost/ first map to lower case. Spotted by Skip.


Index: urllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v
retrieving revision 1.151
retrieving revision 1.152
diff -C2 -d -r1.151 -r1.152
*** urllib.py	12 Sep 2002 19:47:52 -0000	1.151
--- urllib.py	12 Sep 2002 20:14:04 -0000	1.152
***************
*** 405,409 ****
      def open_file(self, url):
          """Use local file or FTP depending on form of URL."""
!         if url[:2] == '//' and url[2:3] != '/' and url[2:12] != 'localhost/':
              return self.open_ftp(url)
          else:
--- 405,409 ----
      def open_file(self, url):
          """Use local file or FTP depending on form of URL."""
!         if url[:2] == '//' and url[2:3] != '/' and url[2:12].lower() != 'localhost/':
              return self.open_ftp(url)
          else: