W3C home > Mailing lists > Public > www-lib@w3.org > January to March 1999

Re: Comparing URLs

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Wed, 17 Mar 1999 15:25:39 -0500
Message-Id: <>
To: Vaclav Barta <vbar@comp.cz>, wwwlib <www-lib@w3.org>
At 08:01 13/03/1999 +0000, Vaclav Barta wrote:
>HTTP 1.1 standard defines an algorithm for comparing URLs (paths
>are case sensitive, default port is 80...), which I'm too lazy
>to implement. Is there a function like
>	int compare_url(const char *url1, const char *url2);
>in libwww (or somewhere else)? I looked how webbot does it but
>I keep getting lost...

You can have a look at the URI canonicalization function in


It actually changes the string and is used when creating a new anchor:

	PUBLIC HTAnchor * HTAnchor_findAddress (const char * address)

which can be found in


There is no direct function that says: Are these two URIs identical. What
libwww normally does is to create anchor objects for each URI and identical
URIs of course will have the same anchor. You are welcome to add one based
on HTSimplify so that I can add it.

Henrik Frystyk Nielsen,
World Wide Web Consortium
Received on Wednesday, 17 March 1999 15:25:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:49 UTC