Re: HTParse

Gecse Roland writes:

> How can I figure out the hostname from URL-s like this (also without the 
> tailing slash):
> 
> http://www.sch.bme.hu/~groland
> 
> I know that this is not a valid URL since the HTTP server returns a 
> redirection to:
> 
> http://www.sch.bme.hu/~groland/
> 
> but I need to extract the hostname from the first. I tried to use
> 
> .. = HTParse(url, "", PARSE_HOST)
> 
> but it returns NULL! Should I write my own hostname parser?

It's the right was to do it and HTParse should never return NULL - it will at 
least return an empty string. This seems to me like a memory error somewhere...


-- 

Henrik Frystyk Nielsen, <frystyk@w3.org>
World-Wide Web Consortium, MIT/LCS NE43-356
545 Technology Square, Cambridge MA 02139, USA

Received on Friday, 5 April 1996 10:59:14 UTC