W3C home > Mailing lists > Public > www-lib@w3.org > April to June 1996

Re: HTParse

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Fri, 05 Apr 1996 10:58:49 -0500
Message-Id: <199604051558.KAA03286@anansi.w3.org>
To: Gecse Roland <groland@balu.sch.bme.hu>
Cc: www-lib <www-lib@w3.org>
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 GMT

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