Mailing List Archive

HTTP/1.1 and BASE
This question is for Roy, but it's probably worth making it
public.

When HTTP/1.1 allows me to set a BASE url in the header, will the client
only use that URL to resolve relative URLs, or will it have the
effect of telling the client "Hey, this is where you actually are".

I got really annoyed when Netscape (rightly) dropped the Mosaic
approach of exchanging the current URL with the BASE URL, because
I found it really useful to be able to serve documents using
temporary links, but then give the client the permanent link.

If, as I suspect, BASE headers will be for relative URL fixing only,
is there any chance of getting a new header (or HTML tag) to tell the
client, "update you current URL to 'X'".

It'd be really useful for redirects too. The user would be able to
see where they were, and bookmark the correct URL instead of the
one that has to be redirected.

robh
Re: HTTP/1.1 and BASE [ In reply to ]
> When HTTP/1.1 allows me to set a BASE url in the header, will the client
> only use that URL to resolve relative URLs, or will it have the
> effect of telling the client "Hey, this is where you actually are".

I think the former.

> I got really annoyed when Netscape (rightly) dropped the Mosaic
> approach of exchanging the current URL with the BASE URL, because
> I found it really useful to be able to serve documents using
> temporary links, but then give the client the permanent link.
>
> If, as I suspect, BASE headers will be for relative URL fixing only,
> is there any chance of getting a new header (or HTML tag) to tell the
> client, "update you current URL to 'X'".
>
> It'd be really useful for redirects too. The user would be able to
> see where they were, and bookmark the correct URL instead of the
> one that has to be redirected.

RobM asked me about similar stuff ages ago, but I can't remember
what I said (not that it would matter much, as its probably changed
since then). ;-)

Anyway, the way I see it now [post-comments from the last IETF], the
Location header will be re-invigorated to mean several things:

1) On any 2xx response, "this is where you actually are".

2) When no Base header is present, "this is the Base".

3) When no URI header is present, "this is the one and only known URI".

4) On 3xx, "this is the authoritative location for the resource"
and you can auto-redirect on it or any of the values of the URI header
(if any), providing that such URI was not in the request chain that
resulted in the redirect.

In other words, Location will do what you want. Hmmmm, come to think
of it, I'll probably have to buy RobM another beer because of this. ;-)
My virtual beer debt is really piling up.

.......Roy

p.s.: Conference Hell is upon us all -- I am now about to embark on a
two-week trip through California, Oregon and Washington
(WebWorld and ICSE-17). I'll be back arounf May 4.
Happy patching.
Re: HTTP/1.1 and BASE [ In reply to ]
> This question is for Roy, but it's probably worth making it
> public.
>
> When HTTP/1.1 allows me to set a BASE url in the header, will the client
> only use that URL to resolve relative URLs, or will it have the
> effect of telling the client "Hey, this is where you actually are".
>
> I got really annoyed when Netscape (rightly) dropped the Mosaic
> approach of exchanging the current URL with the BASE URL, because
> I found it really useful to be able to serve documents using
> temporary links, but then give the client the permanent link.
>
> If, as I suspect, BASE headers will be for relative URL fixing only,
> is there any chance of getting a new header (or HTML tag) to tell the
> client, "update you current URL to 'X'".
>
> It'd be really useful for redirects too. The user would be able to
> see where they were, and bookmark the correct URL instead of the
> one that has to be redirected.
>
> robh


Groan. Due to one of life's unhappy little coincidences I've just come
across this problem for the first time today. Got some 'control panel'
ismap that redirects the client to some useful page or other, but utterly
fails to convince Netscape that Location: has changed. Hence a hotlist
full of /cgi-bin/some_redirect_script?123,23 items.

In addition, the relative urls (like for images etc) in the redirected-to
page go missing because the browser is using /cgi-bin/ as the effective
BASE for the request.

I could put a <BASE...> header in the redirected-to page but then I
have to hardcode the machine, port and full directory structure, which for
a web application that's meant to run on 3 different mirrors round the
world, each with different internal hierarchies, is just plain sub-optimal.

This really sucks.

Ay.