Re: URL misses '/'

At 15:01 10/07/1999 +0000, Vaclav Barta wrote:

>When I call HTLoadAbsolute on "http://localhost", my link callback
>is called for all links on http://localhost/index.html - as
>I'd expect. But when I call HTAnchor_followMainLink on a passed-in
>anchor (like libwww robot does it), I get wrong URL - it misses
>the separator between parent URL and relative name in the page.
>I. e. <a href=php/>php</a> in http://localhost/index.html gets
>mangled into http://localhostphp/ . This happens whether I have
>redirection filter installed or not, on a new snapshot of libwww.
>Any ideas?

The libwww URI parser [1] requires that there is a '/' at the end of all
URIs. The way to get around that is to use the HTParse(..) function (also
in [1]) using PARSE_ALL which canonicalizes the URI and among other things
put a '/' at the end if the path is empty.

Henrik

[1] http://www.w3.org/Library/src/HTParse.html
--
Henrik Frystyk Nielsen,
World Wide Web Consortium
http://www.w3.org/People/Frystyk

Received on Saturday, 10 July 1999 15:12:37 UTC