From: Hartmut Holzgraefe Date: Thu, 21 Nov 2002 10:53:18 +0000 (+0000) Subject: MFH X-Git-Tag: php-4.3.0RC2~64 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f6afc578c5a57a7cd889307fb643c6e2b25200b;p=php MFH --- diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index 5d40a5a9aa..685060b5f1 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -95,8 +95,8 @@ static size_t php_stream_input_read(php_stream *stream, char *buf, size_t count stream->eof = 1; } } - - return read_bytes; + SG(read_post_bytes) += read_bytes; + return read_bytes; } static int php_stream_input_close(php_stream *stream, int close_handle TSRMLS_DC) diff --git a/main/SAPI.c b/main/SAPI.c index 08eec845eb..7e8bf91845 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -358,8 +358,10 @@ SAPI_API void sapi_deactivate(TSRMLS_D) if(sapi_module.read_post) { /* make sure we've consumed all request input data */ char dummy[SAPI_POST_BLOCK_SIZE]; - while(sapi_module.read_post(dummy, sizeof(dummy)-1 TSRMLS_CC) > 0) { - /* empty loop body */ + int read_bytes; + + while((read_bytes = sapi_module.read_post(dummy, sizeof(dummy)-1 TSRMLS_CC)) > 0) { + SG(read_post_bytes) += read_bytes; } } }