anchors in Location: header

Bill Houle (Bill.Houle@sandiegoca.ncr.com)
Tue, 04 Nov 1997 14:07:32 -0800


My apologies; this not a question specific to LWP problems. But I've asked
a few CGI lists and cannot find an answer.

The HTTP specs claim that only an absolute URI -- read "fully http:
qualified" -- can be used for a Location redirect. However, I have verified
that this works:

	$url = "/path/to/file.htm";
	print "Location: $url\n\n";

Yet this does not:
	$url = "/path/to/file.htm";
	$url .= "#anchor";
	print "Location: $url\n\n";

If I fully-qualify the URL (http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT})
both examples work. 

Is my interpretation of the RFC incorrect, or is the fact that one works
and the other doesn't a browser (NN4.0) or server (NCSA1.5) anomaly? Is
there any way I can get an anchored, absolute, non-qualifed URI to work
universally in a Location: field?


--bill