summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/php_fopen_wrapper.c1
-rw-r--r--main/SAPI.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c
index 5d40a5a9aa..27230602a3 100644
--- a/ext/standard/php_fopen_wrapper.c
+++ b/ext/standard/php_fopen_wrapper.c
@@ -96,6 +96,7 @@ static size_t php_stream_input_read(php_stream *stream, char *buf, size_t count
}
}
+ SG(read_post_bytes) += read_bytes;
return read_bytes;
}
diff --git a/main/SAPI.c b/main/SAPI.c
index 91186311db..fd9b089bc5 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -390,8 +390,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;
}
}
}