[Python-Dev] Can ftp url start with file:// ? (original) (raw)
Bill Janssen janssen at parc.com
Sun Jul 11 21:00:17 CEST 2010
- Previous message: [Python-Dev] Can ftp url start with file:// ?
- Next message: [Python-Dev] Py_Buffer and pep3118
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Fred Drake <fdrake at acm.org> wrote:
On Sat, Jul 10, 2010 at 11:56 PM, Senthil Kumaran <orsenthil at gmail.com> wro= te: > I see the reason. But I doubt if this is a reliable approach. =A0Also > 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.
I'm not trying to defend the current behavior of defaulting to FTP as a good thing; it's definitely surprising. I am trying to rationalize it so I can be sure I understand why it might have been done to start with. My own preference is to kick out any non-local references with an exception that can be detected (possibly derived from ValueError) so that applications that want rewrite (hopefully with user agreement!) can do so. (Checking for non-local file: URLs on input might be better, of course.)
Sounds like a good plan to me, too.
Bill
- Previous message: [Python-Dev] Can ftp url start with file:// ?
- Next message: [Python-Dev] Py_Buffer and pep3118
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]