diff --git a/src/apache.c b/src/apache.c
index c90213e7a72278e2ece3be650c53fdfee2af5446..530481be3f802b88bb4582a14dd9aef84612eef5 100644 (file)
--- a/src/apache.c
+++ b/src/apache.c
#if HAVE_LIBCURL
static CURL *curl = 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 */
static int apache_buffer_len = 0;
static char apache_curl_error[CURL_ERROR_SIZE];
#endif /* HAVE_LIBCURL */
{
size_t len = size * nmemb;
{
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)
}
if (len <= 0)
if (url == NULL)
return;
if (url == NULL)
return;
+ apache_buffer_len = 0;
if (curl_easy_perform (curl) != 0)
{
syslog (LOG_WARNING, "apache: curl_easy_perform failed: %s", apache_curl_error);
if (curl_easy_perform (curl) != 0)
{
syslog (LOG_WARNING, "apache: curl_easy_perform failed: %s", apache_curl_error);