Re: Comparing URLs

At 09:51 3/25/99 -0800, tvaughan@aventail.com wrote:
>Henrik Frystyk Nielsen <frystyk@w3.org> writes:
>
>> You can have a look at the URI canonicalization function in
>> 
>> 	http://www.w3.org/Library/src/HTParse.html
>
>This seems to just operate on the path portion of the url. Is there a
>function which takes a url like:
>
>	http://www/some/./path/
>
>and turns it into:
>
>	http://www.w3.org:80/some/path/

For some time, I canonicalized the hostname as part of the HTParse
function. However, it turns out that there is no safe mechanism to get the
domain name - people are often playing tricks with the domain names and NIS
also often gets in the way.

I therefore had to disable it - but the code is still there - look in

	http://www.w3.org/Library/src/HTParse.c

in the HTCanon function. It would be nice if you could add a flag so that
this can be enabled/disabled on demand by the app.

Henrik
--
Henrik Frystyk Nielsen,
World Wide Web Consortium
http://www.w3.org/People/Frystyk

Received on Wednesday, 31 March 1999 12:46:05 UTC