Senthil Kumaran wrote: > 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. > My own inclination would be to regard the current treatment of file: as a bug (albeit one not worth fixing on 2.x). RFC 1630 specification lists the "file" scheme as being for "local file access", and RFC 1738 says they are for "host-specific file names" and points out that "The file URL scheme is unusual in that it does not specify an Internet protocol or access method for such files; as such, its utility in network protocols between hosts is limited." Presumably a hostname in such a URI would require that some host-specific protocol be used (but this should be an access protocol like SMB or NFS, not a transfer protocol like FTP).
It seems pretty clear that randomly interpreting particular host names to imply a specific remote-access protocol like FTP is bogus. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 DjangoCon US September 7-9, 2010 http://djangocon.us/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.holdenweb.com/ _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com