From e4e51c6605b934c3f5e85f38436ce3e84038595e Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 26 Sep 2006 20:05:21 +0200 Subject: [PATCH] src/apache.c: Increase the buffer size from 4kByte to 16kByte, since this was a problem twice. Also, make this limit easier to configure. --- src/apache.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/apache.c b/src/apache.c index 156ad5dc..530481be 100644 --- a/src/apache.c +++ b/src/apache.c @@ -42,7 +42,8 @@ static char *cacert = NULL; #if HAVE_LIBCURL static CURL *curl = NULL; -static char apache_buffer[4096]; +#define ABUFFER_SIZE 16384 +static char apache_buffer[ABUFFER_SIZE]; static int apache_buffer_len = 0; static char apache_curl_error[CURL_ERROR_SIZE]; #endif /* HAVE_LIBCURL */ @@ -89,9 +90,9 @@ static size_t apache_curl_callback (void *buf, size_t size, size_t nmemb, void * { size_t len = size * nmemb; - if ((apache_buffer_len + len) >= 4096) + if ((apache_buffer_len + len) >= ABUFFER_SIZE) { - len = 4095 - apache_buffer_len; + len = (ABUFFER_SIZE - 1) - apache_buffer_len; } if (len <= 0) -- 2.30.2