iliaa Wed Feb 25 19:03:58 2004 EDT
Modified files: (Branch: PHP_4_3)
/php-src/ext/standard http_fopen_wrapper.c
Log:
MFH: Handle situation where feof() occurs before the HTTP header is
retrieved.
http://cvs.php.net/diff.php/php-src/ext/standard/http_fopen_wrapper.c?r1=1.53.2.16&r2=1.53.2.17&ty=u
Index: php-src/ext/standard/http_fopen_wrapper.c
diff -u php-src/ext/standard/http_fopen_wrapper.c:1.53.2.16
php-src/ext/standard/http_fopen_wrapper.c:1.53.2.17
--- php-src/ext/standard/http_fopen_wrapper.c:1.53.2.16 Wed Feb 25 08:20:31 2004
+++ php-src/ext/standard/http_fopen_wrapper.c Wed Feb 25 19:03:57 2004
@@ -18,7 +18,7 @@
| Wez Furlong <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: http_fopen_wrapper.c,v 1.53.2.16 2004/02/25 13:20:31 sniper Exp $ */
+/* $Id: http_fopen_wrapper.c,v 1.53.2.17 2004/02/26 00:03:57 iliaa Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -387,6 +387,9 @@
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 */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php