|
|
ff08e8 |
From 8aca362e812827501f0545f4abea140f89fa87e3 Mon Sep 17 00:00:00 2001
|
|
|
ff08e8 |
From: Rich Megginson <rmeggins@redhat.com>
|
|
|
ff08e8 |
Date: Mon, 16 Jul 2018 15:55:35 -0600
|
|
|
ff08e8 |
Subject: [PATCH] Bug 1600171 - Rsyslog omelasticsearch does not work with ES
|
|
|
ff08e8 |
6.x strict headers
|
|
|
ff08e8 |
|
|
|
ff08e8 |
https://bugzilla.redhat.com/show_bug.cgi?id=1600171
|
|
|
ff08e8 |
I did not attempt to backport all of the commits that
|
|
|
ff08e8 |
touched this particular code, just the code that uses
|
|
|
ff08e8 |
the macro for the content type.
|
|
|
ff08e8 |
---
|
|
|
ff08e8 |
plugins/omelasticsearch/omelasticsearch.c | 3 ++-
|
|
|
ff08e8 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
ff08e8 |
|
|
|
ff08e8 |
diff --git a/plugins/omelasticsearch/omelasticsearch.c b/plugins/omelasticsearch/omelasticsearch.c
|
|
|
ff08e8 |
index 248a369d2..feb6425f7 100644
|
|
|
ff08e8 |
--- a/plugins/omelasticsearch/omelasticsearch.c
|
|
|
ff08e8 |
+++ b/plugins/omelasticsearch/omelasticsearch.c
|
|
|
ff08e8 |
@@ -1607,10 +1607,11 @@ curlPostSetup(CURL *handle, HEADER *header, uchar* authBuf, wrkrInstanceData_t *
|
|
|
ff08e8 |
curl_easy_setopt(handle, CURLOPT_SSLKEY, pWrkrData->pData->myPrivKeyFile);
|
|
|
ff08e8 |
}
|
|
|
ff08e8 |
|
|
|
ff08e8 |
+#define CONTENT_JSON "Content-Type: application/json; charset=utf-8"
|
|
|
ff08e8 |
static rsRetVal
|
|
|
ff08e8 |
curlSetup(wrkrInstanceData_t *pWrkrData, instanceData *pData)
|
|
|
ff08e8 |
{
|
|
|
ff08e8 |
- pWrkrData->curlHeader = curl_slist_append(NULL, "Content-Type: text/json; charset=utf-8");
|
|
|
ff08e8 |
+ pWrkrData->curlHeader = curl_slist_append(NULL, CONTENT_JSON);
|
|
|
ff08e8 |
pWrkrData->curlPostHandle = curl_easy_init();
|
|
|
ff08e8 |
if (pWrkrData->curlPostHandle == NULL) {
|
|
|
ff08e8 |
return RS_RET_OBJ_CREATION_FAILED;
|
|
|
ff08e8 |
--
|
|
|
ff08e8 |
2.17.1
|
|
|
ff08e8 |
|