On Sun, 12 Aug 2001, Benjamin Gandon wrote:
I've just pointed out that we use the "Location:" HTTP header field in a manner that is not HTTP complilant. It seems that it work because browsers seem to respect Postel's advice ("be conservative in what you send and liberal in what you accept").
rfc 2816 says:
Location = "Location" ":" absoluteURI
An example is:
Location: http://www.w3.org/pub/WWW/People.html
And we use for example: tbl_select.php3:181: header('Location: sql.php3?' . $url_query);
And that is quite not an absolute URI... I didn't find any suitable header in rfc2616 that could replace the "Location:" one and accept relative URI. ("Content-Location:" is quite good but it does not specify a replacement for the original requested URI).
It seems that in order to have phpMyAdmin generate absolute URI in "Location:" HTTP headers, we have to introduce a configuration variable that would hold the absolute path (server name + path!).
I don't think solving this is urgent because it works fine like that (except lynx who warns the user that the Location URL is not absolute and then goes to the right place).
We can postpone that for a later version or let it go and just document that we do that (My lazyness would recommend letting it go :)).
It's important for closure, but it can wait.
BTW, the way to do this is:
header('Location: http://%27.$HTTP_SERVER_VARS%5B%27HTTP_HOST']. dirname($HTTP_SERVER_VARS['REQUEST_URI']).'/sql.php3?'.$url_query);
or something to that effect.