]> granicus.if.org Git - php/commitdiff
MFH: Handle situation where feof() occurs before the HTTP header is
authorIlia Alshanetsky <iliaa@php.net>
Thu, 26 Feb 2004 00:03:57 +0000 (00:03 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 26 Feb 2004 00:03:57 +0000 (00:03 +0000)
retrieved.

ext/standard/http_fopen_wrapper.c

index 7c8e6e8cfaaa56a3a67b03c379538f00e21f0fc8..b72ae9693b80ffca63c9ba92a271975052b1a3f1 100644 (file)
@@ -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 */