W3C home > Mailing lists > Public > www-talk@w3.org > January to February 1997

Re: Content-Base response header

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Fri, 21 Feb 1997 11:17:59 -0500
Message-Id: <3.0.1.32.19970221111759.0099ea10@pop.w3.org>
To: Dave Ingham <Dave.Ingham@newcastle.ac.uk>, www-talk@w3.org
At 03:28 PM 2/21/97 +0000, Dave Ingham wrote:
>Does anyone know if any browsers support Content-Base headers with
>HTTP/1.0 requests? I have tried a number of experiments with no success.

If you are looking for an example of how to do it then libwww follows the
rules set in the HTTP/1.1 specification in handling URL expansion. The
algorithm goes like this

	if ( Content-Base )				/* Must be absolute */
		base = Content-Base
	else if ( Content-Location )		/* Can be relative or absolute */
		if ( Content-Location is absolute)
			base = Content-Location
		else
			base = Request-URI		/* Must be absolute */
		endif
	endif

	expanded = URL taken relative to base

Content-base can be changed in the HTML document itself in which case you
just run the algorithm again.

libwww is available from
	
	http://www.w3.org/pub/WWW/Library/

Thanks,

Henrik
--
Henrik Frystyk Nielsen, <frystyk@w3.org>
World Wide Web Consortium, MIT/LCS NE43-346
545 Technology Square, Cambridge MA 02139, USA
Received on Friday, 21 February 1997 11:17:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:22 GMT