From 7b70d47a335f31fba20a73cb769e08f4f4138886 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 17 Dec 2023 08:57:15 +0100 Subject: [PATCH] write_http plugin: Clear the response buffer before issuing the request. Previously all responses were concatenated together until the buffer was full, at which point no additional responses were accessible. --- src/write_http.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/write_http.c b/src/write_http.c index e0b69163d..a05770978 100644 --- a/src/write_http.c +++ b/src/write_http.c @@ -149,6 +149,7 @@ static void wh_log_http_error(wh_callback_t *cb) { static int wh_post(wh_callback_t *cb, char const *data, long size) { pthread_mutex_lock(&cb->curl_lock); + cb->response_buffer_pos = 0; curl_easy_setopt(cb->curl, CURLOPT_URL, cb->location); curl_easy_setopt(cb->curl, CURLOPT_POSTFIELDSIZE, size); curl_easy_setopt(cb->curl, CURLOPT_POSTFIELDS, data); -- 2.47.2