Re: Problem mit streams and http_fopen_wrapper
| From: | Wez Furlong | Date: | Mon, 13 May 2002 21:31:58 +0000 |
| Subject: | Re: Problem mit streams and http_fopen_wrapper | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-84018@lists.php.net to get a copy of this message | ||
On 13/05/02, "Markus Fischer" <mfischer@guru.josefine.at> wrote:
> No idea what's wrong with 2)
Its the zval that holds the headers that's leaking.
> The line I've marked with 'MARK 1' results in the 'Success'
> phrase because errno is just zero. And as far as I could see
> in php4/ext/standard/http_fopen_wrapper.c errrno is never set
> to any kind of error value. It doesn't nmake much sense
> anyway because it's an HTTP error, nothing which is covered
> with any of the system error messages. I think we should seek
> for another solution here (stream-dependant error handling?)
We have the bare-bones of a mechanism for this in the stream notification
API, but we don't always have a stream context for error reporting.
I was toying with the idea of having a "default" context that could be
used for this purpose.
> The former one is generated by php_stream_url_wrap_http
> itself, the latter by _php_stream_open_wrapper_ex.
In the meantime, a workaround is to not emit an error if errno is 0;
streams can assume that this means that the wrapper opener function
has already displayed the error.
> Despite this, awesome work Wez did here!
Thanks :-)
And thanks for finding this buglet also.
--Wez.