Re: Location: when status = 200
Wed, 31 Aug 94 10:47 PDT

Chris Adie writes:
> What semantics, if any, are associated with the Location: header if
> the status code returned by the server is 200 (OK)?
> This question is prompted by the following problem I have with my
> Windows NT HTTP server.
> When an ISMAP image is clicked on, the server recieves a URL like
> "/UK.MAP?126,43". If this maps to a remote file (ie the UK.MAP file
> contains some URL starting http://...), the server issues a 302
> status and a Location: header with the mapped-to URL. The client
> goes off and fetches it, no problem.
> If the point 126,43 maps to a local file, the server delivers the
> file directly, without doing a redirect. The problem with this is
> that the client records the URL as "/UK.MAP?126,43" which causes
> problems if the document is not located in the same directory as
> UK.MAP and contains relative URLs. It also causes problems if the
> document contains an <ISINDEX>.
> Clearly, the workaround is to use full URLs in the map file, but this
> results in an unnecessary extra connection.
> It would be good if the server could use the Location: header to
> indicate the actual URL of the document being served. Do any clients
> support this? If so, I'll implement it in the server.

The Location: header should be _IGNORED_ if it is not given with one of
the 3xx error codes. If its not, the browser is broken.

I believe you can get the behavior you want by using the BASE tag.
Something like:

<base href="/the/real/path/not/UK.MAP...">

at the beginning of the file (in the <head></head> area) should do the
trick. AIR Mosaic, XMosaic, and Emacs-w3 all support the base tag. Not
sure of any others, but I'm sure I'm probably missing some.

-Bill P.