diff --git a/functions/http.xml b/functions/http.xml index 7afa59d841..be3f523c41 100644 --- a/functions/http.xml +++ b/functions/http.xml @@ -1,5 +1,5 @@ - + HTTP functions HTTP @@ -60,6 +60,24 @@ exit; /* Make sure that code below does + + + HTTP 1.1 requires an absolute URI as argument to + Location: + including protocol, hostname and absolute path. Some clients + might accept relative URIs but you definetly should not rely on + it. You can usually use $HTTP_SERVER_VARS['HTTP_HOST'], + $HTTP_SERVER_VARS['PHP_SELF'] and dirname + to make an absolute URI from a relative one yourself: + + +Header ("Location: http://".$HTTP_SERVER_VARS['HTTP_HOST'] + ."/".dirname($HTTP_SERVER_VARS['PHP_SELF'] + ."/".$relative_url); + + + + The second special-case is any header that starts with the string, "HTTP/" (case is not significant). For