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

index d328311b11e754d13e075ebb4e587c377128d19e..244ffa1b6f75395783f5bf5e64d18948c527ade3 100644 (file)
@@ -399,6 +399,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 */