cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: patch to make drive letters work in file:// urls under Windows

From: Ufuk Kayserilioglu <groups_at_paralaus.com>
Date: Fri, 08 Aug 2003 10:52:33 +0300

Himm.. No wonder I was confused by the relative path stuff for file: URLs.

You are correct. I happened to have done the tests on the c: drive. Now repeating them on the e: drive like so:
        E:> c:\bin\curl.exe file://c:/test.exe
all the 7 tests fail. [1], [5], [7] fail for the exact reason you have stated, they are looking for relative path to the root of the drive. For example, now, [1] fails with: Couldn't open file /test.txt.

I have also looked at the URL
        file:c:/test.txt
This one fails miserably with: (6) Couldn't resolve host 'file:c:' both run on the c: drive and the e: drive.

Hope it helps,

Ufuk Kayserilioglu

Dan Fandrich wrote:

>On Thu, Aug 07, 2003 at 10:49:19PM +0300, Ufuk Kayserilioglu wrote:
>
>
>>Sorry I realized, just after I sent the mail out, that I should also
>>test the output of cURL with the same set. Here they are:
>>
>>[1] file://c:/test.txt
>>[2] file:///c:/test.txt
>>[3] file://localhost/c:/test.txt
>>[4] file://localhost//c:/test.txt
>>[5] file://c:/test dir/test.txt
>>[6] file:///c:/test%20dir/test.txt
>>[7] file://c:/test%20dir/test.txt
>>
>>cURL:
>>
>>[1] OK
>>[2] Fails (curl: (37) Couldn't open file /c:/test.txt)
>>[3] Fails (curl: (37) Couldn't open file /c:/test.txt)
>>[4] Fails (curl: (37) Couldn't open file /c:/test.txt)
>>[5] OK
>>[6] Fails (curl: (37) Couldn't open file /c:/test%20dir/test.txt)
>>[7] OK
>>
>>
>
>Are you sure the results of [1], [5] and [7] are from accessing drive C:
>explicitly? I wouldn't be surprised if in those cases the drive letter is
>ignored and the current drive is used. Also, it would be interesting to see
>the results of testing file:c:/test.txt
>
>
>
>>>>Dan
>>>>
>>>>

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-08