curl-library
Re: file protocol
Date: Mon, 19 Apr 2004 08:04:25 +0200 (CEST)
On Sun, 18 Apr 2004, Seshubabu Pasam wrote:
> Should the file protocol handle relative paths or is it always assumed to be
> absolute path?
It always assumes and expects absolute paths. There is no concept of "current
directory" for it.
> I mean, should it be able to handle "file://abc/def"?
Strictly speaking (in curl land at least), that is not a correct file:// URL
as that URL identifies a file on the host 'abc' but the file: URLs don't
specify an access method to get files off (remote) hosts so we can't.
A proper file: URL would be "file://localhost/def" or for conveniance, just
blank the host name: "file:///def".
> When I try this with curl, it is trying to look for file "/def". I guess it
> is looking for first '/' after "file://".
Yes, and if you try other tools (such as your favourite browsers) I exepect
that you'll see the same behavior.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-04-19