From: Michael Wallner Date: Sun, 9 Dec 2012 22:17:56 +0000 (+0000) Subject: explicit chunk size X-Git-Tag: RELEASE_2_1_0_RC3~10^2^2~94 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=5b61dddf44a9153d722e29b0ad61633afb527820;p=m6w6%2Fext-http explicit chunk size --- 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) {