cURL / Mailing Lists / curl-library / Single Mail


Re: Problem with ./ in redirect

From: Daniel Stenberg <>
Date: Mon, 7 Oct 2002 10:01:31 +0200 (MET DST)

On Fri, 4 Oct 2002, Ufuk Kayserilioglu wrote:

[Moved this over to the libcurl mailing list]

> I have recently had the chance to integrate cURL into a browser type of
> program which works with relative URLs which may or may not contain ./ and
> ../ variants. Thus before I give cURL the URL to fetch I had to somehow
> combine the base and relative URLs to come up with the absolute one. I used
> to think that cURL already possessed functionality to perform such a thing
> (at the end of the day it has to do the same inside at some point) but was
> suprised to see that no such function existed.

Like for all features, there comes a day when it has to be added. If no one
requests a feature, it is never added. This was an example of a feature that
however obvious it may look now, never has turned up to cause any problems in
the past.

You could've made us aware of this by reporting it, or by providing the code
we lacked.

> I decided to use the InternetCrackURL and InternetCombineURL functions in
> the WinInet library of Windows (even though I didn't enjoy the idea of
> using yet another component for the task).

I can understand that. Also, using WinInet makes your application break the
portability that libcurl otherwise can help you maintain.

> Now that the issue is being dealt with inside the cURL community, may I
> suggest that such functionality also be exposed through the library. We
> could maybe have curl_url_combine() and curl_url_crack() kind of functions.
> I would even offer my own contributions to such a cause.

I've thought about offering such functions, but again, no one has requested
them and thus I have not found any good motive to spend time and energy on

Could you write down a proposal on how the functions would work and how you'd
use them? It would make it a lot easier for all of us to understand what
you're suggesting and based on that figure out if this is a good or bad

I've never seen nor used the WinInet library.

 Daniel Stenberg -- curl related mails on curl related mailing lists please
This email is sponsored by:ThinkGeek
Welcome to geek heaven.
Received on 2002-10-07