From 5b4eeb628ce3e874edb837e727412ed541996a8d Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Thu, 26 Feb 2004 00:03:57 +0000 Subject: [PATCH] MFH: Handle situation where feof() occurs before the HTTP header is retrieved. --- ext/standard/http_fopen_wrapper.c | 3 +++ 1 file changed, 3 insertions(+) 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 */ -- 2.50.1