Re: Content-Base response header

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 UTC