cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: test200

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 5 Aug 2003 17:10:27 -0700

On Tue, Aug 05, 2003 at 03:47:09PM -0700, David Byron wrote:
> 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:

IE 6.0 seems to use the latter syntax when it URLifies a path, but accepts
the former as well. I'm sure Netscape allows a vertical bar | instead
of a colon in the latter format, to avoid the kind of parsing ambiguity
you're finding. I just tried it and IE accepts file:c| and file:///c|/
as well.

> /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.

How about Symbian OS?

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
-------------------------------------------------------
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