Re: Improvements to HTTP stream metadata

From: Date: Fri, 01 Jul 2011 10:08:10 +0000
Subject: Re: Improvements to HTTP stream metadata
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-53717@lists.php.net to get a copy of this message
On Fri, Jul 1, 2011 at 10:18, David Zülke <david.zuelke@bitextender.com> wrote: > On 01.07.2011, at 01:29, Stas Malyshev wrote: > >> Hi! >> >> On 6/30/11 2:34 PM, Michael Maclean wrote: >>> The same data also ends up in the bizarre $http_response_headers var >>> that gets spontaneously created in local scope - I've wondered about how >>> good that is to do. >> >> This thing is indeed bizzare. I wonder if anybody uses it and why it was done this way... > > I've used it before... IIRC, it was because that var gets set on older PHP versions even > if the HTTP response is an error (in which case the stream is destroyed and you can't get the > metadata anymore either; newer versions have the "ignore_errors" context option for that). > I use it extensively. Its nearly the only way to get the headers from file_get_contents() for example. -Hannes

« previous php.internals (#53717) next »