svn: /phpdoc/en/trunk/language/context/ http.xml

From: Date: Fri, 10 Dec 2010 04:27:14 +0000
Subject: svn: /phpdoc/en/trunk/language/context/ http.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-7501@lists.php.net to get a copy of this message
sean Fri, 10 Dec 2010 04:27:14 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=306165 Log: add note about HTTP status messages and the context wrapper data Changed paths: U phpdoc/en/trunk/language/context/http.xml Modified: phpdoc/en/trunk/language/context/http.xml =================================================================== --- phpdoc/en/trunk/language/context/http.xml 2010-12-10 02:40:51 UTC (rev 306164) +++ phpdoc/en/trunk/language/context/http.xml 2010-12-10 04:27:14 UTC (rev 306165) @@ -318,6 +318,34 @@ for the <literal>ssl://</literal> transport. </simpara> </note> + <note> + <title>HTTP status line</title> + <simpara> + When this stream wrapper follows a redirect, the + <literal>wrapper_data</literal> returned by + <function>stream_get_meta_data</function> might not necessarily contain + the HTTP status line that actually applies to the content data at index + <literal>0</literal>. + </simpara> + <simpara> + <programlisting> +array ( + 'wrapper_data' => + array ( + 0 => 'HTTP/1.0 301 Moved Permantenly', + 1 => 'Cache-Control: no-cache', + 2 => 'Connection: close', + 3 => 'Location: http://example.com/foo.jpg', + 4 => 'HTTP/1.1 200 OK', + ... + </programlisting> + </simpara> + <simpara> + The first request returned a <literal>301</literal> (permanent redirect), + so the stream wrapper automatically followed the redirect to get a + <literal>200</literal> response (index = <literal>4</literal>). + </simpara> + </note> </refsect1> <refsect1 role="seealso">

« previous php.doc.cvs (#7501) next »