cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: test200

From: David Byron <DByron_at_everdreamcorp.com>
Date: Tue, 5 Aug 2003 15:47:09 -0700

> > Looks like somewhere in the block of code that starts at
> > line 1929 of url.c (1.290) is the place.
>
> I think you should do the drive letter code within the
> Curl_file_connect function in lib/file.c, as that code
> already does some windows magic convertions on the path.

I think I've got make at least a bit of a change to url.c as conn->path at
the beginning of Curl_file_connect has the place where the drive letter and
colon would be stripped off.

For example:

$ ./curl -v file://c:/src/cobra/curl/tests/log/test200.txt

by the time I get to Curl_file_connect,

conn->path is /src/cobra/curl/tests/log/test200.txt

After reading RFC 1738 (section 3.10 of
http://www.rfc-editor.org/rfc/rfc1738.txt), it appears the above URL may not
be right.

Is file://localhost/c:/src/cobra/curl/tests/log/test200.txt or perhaps
file:///c:/src/cobra/curl/tests/log/test200.txt

more correct? For either of those, conn->path in Curl_file_connect is:

/c:/src/cobra/curl/tests/log/test200.txt

which I suppose I can deal with in WIN32 specific code in Curl_file_connect.
If I just ignore the initial slash, the rest of the code should "just work".

Can you help me decide what the right kind of URL to accept is and I'll go
ahead with a patch?

> > I may have time to give this a shot. Do you want to include drive
> > letter parsing for all platforms, or should I put something
> > inside #if (defined) WIN32?
>
> I'd like it #ifdef WIN32, since I know of no other still used
> platform that supports drive letter prefixes like that.

OK.

-DB

-------------------------------------------------------
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-06