cURL
Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Archives

Re: Drive letter handling in file:// URLs - Win32

From: Guenter <lists_at_gknw.net>
Date: Thu, 05 Nov 2009 05:03:54 +0100

Hi Joshua,
Joshua Kwan schrieb:
> On Win32, it seems like file:// URLs containing drive letters don't work right (current CVS source.)
>
> When I specify file://C:/blah.txt as a URL, the 'C:' is actually stripped away because url.c (ParseURLAndFillConnection) thinks that the C: is a hostname. I think we need to special case it as such:
>
> (on win32 only)
> "If the 'hostname' component of the file:// URL contains at least two characters and that second character is ':', make it part of the path, do NOT discard it."
>
> Right now, asking cURL to download file://D:/blah.txt when you are running from C: doesn't work, because it essentially calls open("\blah.txt"), which is wrong.
>
> Does this seem reasonable? I can bang out a patch for that pretty quick.
> -Josh
it does; I see same with NetWare, though there we have volume names
which can be up to 16 chars before the colon ...; fixing that is already
for a long time on my todo list, but never was a priority since I
personally never used file:// nor other users asked for ...
would be way cool if you could take that into account too, and check for
1-16 chars before the colon, followed by / ...

thanks, Gün.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-05

These mail archives are generated by hypermail.

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET