[ python-Bugs-1357260 ] urllib/urllib2 cannot ftp files which are not listable.

SourceForge.net noreply at sourceforge.net
Tue Nov 15 12:37:58 CET 2005


Bugs item #1357260, was opened at 2005-11-15 10:35
Message generated for change (Comment added) made by mozbugbox
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1357260&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Bugs Fly (mozbugbox)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib/urllib2 cannot ftp files which are not listable.

Initial Comment:
For whatever reason (security, privacy), there are ftp
sites which will not allow ftp list command while
normal downloading can be performed "blindly". This
mostly happens on direct linked ftp urls.

In urllib.py, the ftp wrapper first check with
"self.ftp.nlst(file)" before downloading, thus prevent
the above sites from being useful. From the codes
around, I saw no reason this extra step/check was
performed at all. If the file really did not exist,
RETR would return a suitable error anyway as checked by
the code below.



----------------------------------------------------------------------

>Comment By: Bugs Fly (mozbugbox)
Date: 2005-11-15 11:37

Message:
Logged In: YES 
user_id=1033842

This might be related to bug #635453 but this is a bigger
bug than a directory list is returned. If an existing file
cannot be retrieved, then functionally is totally broken,
there are no work around in this case.





----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1357260&group_id=5470


More information about the Python-bugs-list mailing list