From 5b61dddf44a9153d722e29b0ad61633afb527820 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Sun, 9 Dec 2012 22:17:56 +0000 Subject: [PATCH] explicit chunk size --- php_http_buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php_http_buffer.c b/php_http_buffer.c index ef0abcd..5a609be 100644 --- a/php_http_buffer.c +++ b/php_http_buffer.c @@ -369,7 +369,7 @@ PHP_HTTP_BUFFER_API size_t php_http_buffer_chunk_buffer(php_http_buffer_t **s, c return chunk_size; } - if (storage->used >= (chunk_size = storage->size >> 1)) { + if (storage->used >= chunk_size) { *chunk = estrndup(storage->data, chunk_size); php_http_buffer_cut(storage, 0, chunk_size); return chunk_size; @@ -382,7 +382,7 @@ PHP_HTTP_BUFFER_API void php_http_buffer_chunked_output(php_http_buffer_t **s, c { char *chunk = NULL; size_t got = 0; - + while ((got = php_http_buffer_chunk_buffer(s, data, data_len, &chunk, chunk_len))) { passout(opaque, chunk, got TSRMLS_CC); if (!chunk_len) { -- 2.30.2