[Python-Dev] Can ftp url start with file:// ?

Senthil Kumaran orsenthil at gmail.com
Sun Jul 11 05:56:58 CEST 2010


On Fri, Jul 09, 2010 at 02:32:04PM -0400, Fred Drake wrote:
> FTP access also more often reflected the actual file hierarchy of the
> machine, so trying that path as a system path is more likely to work
> that I'd expect to see for HTTP.

I see the reason. But I doubt if this is a reliable approach.  Also
when the scheme begins with file:// it should not be confused with
ftp, so I think, that portion of code in urllib which work that way
should be removed.

The issue8801 was fixed in a different way so that no regression is
introduced. 

For 3.2 release, shall we do way with relying on ftp for file://
scheme ? Currently for a url like
file://somehost.domain//filesys/file.txt the flow control considers it
a ftp url!

The expected behaviour might be throw an exception saying that file://
url wont make any sense if it not localhost or absolute path.

What if 'somehost.domain' is actually hostname of the machine? Should
file:// be allowed in that case or is it the reason to rely on ftp?
But it still does not make much sense to use ftp, because there is no
guarantee that ftp service is running in that machine.

-- 
Senthil

The whole world is a scab.  The point is to pick it constructively.
		-- Peter Beard


More information about the Python-Dev mailing list