A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2010-July/101640.html below:

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

[Python-Dev] Can ftp url start with file:// ? [Python-Dev] Can ftp url start with file:// ?Bill Janssen janssen at parc.com
Fri Jul 9 18:41:49 CEST 2010
Senthil Kumaran <orsenthil at gmail.com> wrote:

> On Fri, Jul 09, 2010 at 02:23:40PM +1000, Steven D'Aprano wrote:
> > > Is this is valid ftp url?
> > >
> > > # file://ftp.example.com/blah.txt (an ftp URL)
> > >
> > > My answer is no. When we have the scheme specifically mentioned as
> > > file:// it is no point in considering it as ftp url (which should
> > > start with ftp://).
> > 
> > I agree. Just because the host is *called* ftp doesn't mean you should 
> > use the ftp protocol to get the file.
> 
> It was not just for the host being called ftp.example.com
> 
> It was for a pattern that file:/// is local file (correct) and
> file://localhost/somepath is again local file (correct again) but
> file://anyhost.domain/file.txt is actually ftp (pretty weird).

RFC 1738 explicitly says that "file://<host>/<path>" is pretty much useless
for anything except host=localhost:

``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.''

So, FTP is *not* the "default protocol".  On the other hand, if <host>
actually begins with "ftp.", it's a pretty good guess that FTP will
work.  Similarly, if <host> actually begins with "www.", it's a pretty
good guess that HTTP will work.  This seems to me like a
practicality-vs.-purity consideration.

Bill
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4