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

Re: Comparing URLs

From: Vaclav Barta <vbar@comp.cz>
Date: Thu, 25 Mar 1999 10:49:50 +0000
Message-ID: <36FA14CE.5E8A1577@comp.cz>
To: www-lib@w3.org
Henrik Frystyk Nielsen wrote:
> 
> At 08:01 13/03/1999 +0000, Vaclav Barta wrote:
> >Hi,
> >
> >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
> 
>         http://www.w3.org/Library/src/HTParse.html
> 
> 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
> 
>         http://www.w3.org/Library/src/HTAnchor.html
> 
> 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.
Thanks. As I come to think about it (and look at HTSimplify :-) ), it
would probably make more sense for me to just use canonical URIs...

	Bye
		Vasek
--
I have a search engine, too!
http://www.locus.cz/locus/
Received on Thursday, 25 March 1999 06:15:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:29 GMT