From: Ilia Alshanetsky Date: Thu, 26 Feb 2004 00:03:57 +0000 (+0000) Subject: MFH: Handle situation where feof() occurs before the HTTP header is X-Git-Tag: php-4.3.5RC4~61 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5b4eeb628ce3e874edb837e727412ed541996a8d;p=php MFH: Handle situation where feof() occurs before the HTTP header is retrieved. --- diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 7c8e6e8cfa..b72ae9693b 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -387,6 +387,9 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, Z_TYPE_P(http_response) = IS_STRING; zend_hash_next_index_insert(Z_ARRVAL_PP(response_header), &http_response, sizeof(zval *), NULL); } + } else { + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "HTTP request failed, unexpected end of socket.!"); + goto out; } /* read past HTTP headers */