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: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 5 Nov 2009 09:54:06 +0100 (CET)

On Thu, 5 Nov 2009, Claes Jakobsson wrote:

> You're specifying your URL wrong. The schema for file:// URLs is
> file://<host>/<path> so what you need either
>
> file:///C:/...
>
> or
>
> file://localhost/C:/...

Correct! And libcurl actually skips the entire <host> part so you can put
whatever you want there and libcurl won't care.

> If those doesn't work then cURL is doing something wrong.

I think libcurl is doing it wrong. It assumes a unix-style path to follow, so
it uses the path part with a prefixed slash (since the path is treated as an
absolute one) which leads to it trying to open something like
"/C:/tmp/testfile" ...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
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