- From: Henrik Frystyk Nielsen <frystyk@w3.org>
- Date: Wed, 17 Mar 1999 15:25:39 -0500
- To: Vaclav Barta <vbar@comp.cz>, wwwlib <www-lib@w3.org>
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. Henrik -- Henrik Frystyk Nielsen, World Wide Web Consortium http://www.w3.org/People/Frystyk
Received on Wednesday, 17 March 1999 15:25:56 UTC