diff -cr ../Python-1.5.orig/Lib/urllib.py ./Lib/urllib.py *** ../Python-1.5.orig/Lib/urllib.py Sun Dec 28 05:21:20 1997 --- Lib/urllib.py Thu Mar 12 19:48:44 1998 *************** *** 521,526 **** --- 521,528 ---- except ftplib.error_perm, reason: raise IOError, ('ftp error', reason), \ sys.exc_info()[2] + # Restore the transfer mode! + self.ftp.voidcmd(cmd) # Try to retrieve as a file try: cmd = 'RETR ' + file *************** *** 530,535 **** --- 532,539 ---- raise IOError, ('ftp error', reason), \ sys.exc_info()[2] if not conn: + # Set transfer mode to ASCII! + self.ftp.voidcmd('TYPE A') # Try a directory listing if file: cmd = 'LIST ' + file else: cmd = 'LIST'