cvs: phpdoc /en/functions http.xml

From: Date: Sat, 22 Sep 2001 08:39:02 +0000
Subject: cvs: phpdoc /en/functions http.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969337676@lists.php.net to get a copy of this message
hholzgra Sat Sep 22 04:39:02 2001 EDT Modified files: /phpdoc/en/functions http.xml Log: added a note regarding Location: headers and relative URIs Index: phpdoc/en/functions/http.xml diff -u phpdoc/en/functions/http.xml:1.26 phpdoc/en/functions/http.xml:1.27 --- phpdoc/en/functions/http.xml:1.26 Fri Sep 21 21:22:44 2001 +++ phpdoc/en/functions/http.xml Sat Sep 22 04:39:02 2001 @@ -1,5 +1,5 @@ <?xml encoding="iso-8859-1"?> -<!-- $Revision: 1.26 $ --> +<!-- $Revision: 1.27 $ --> <reference id="ref.http"> <title>HTTP functions</title> <titleabbrev>HTTP</titleabbrev> @@ -60,6 +60,24 @@ </programlisting> </informalexample> </para> + <note> + <para> + HTTP 1.1 requires an absolute URI as argument to + <ulink url="&spec.http1.1;/rfc2616-sec14.html#sec14.30">Location:</ulink> + 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 <function>dirname</function> + to make an absolute URI from a relative one yourself: + <informalexample> + <programlisting> +Header ("Location: http://".$HTTP_SERVER_VARS['HTTP_HOST'] + ."/".dirname($HTTP_SERVER_VARS['PHP_SELF'] + ."/".$relative_url); + </programlisting> + </informalexample> + </para> + </note> <para> The second special-case is any header that starts with the string, &quot;HTTP/&quot; (case is not significant). For

« previous php.doc (#969337676) next »