mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-17 01:00:40 +01:00
Merge pull request #1743 from wdauchy/es_contenttype_bulk
omelasticsearch: avoid ES5 warnings while sending json in bulkmode
This commit is contained in:
commit
9cb5c17b82
@ -1326,16 +1326,11 @@ curlPostSetup(CURL *handle, HEADER *header, uchar* authBuf)
|
||||
}
|
||||
|
||||
#define CONTENT_JSON "Content-Type: application/json; charset=utf-8"
|
||||
#define CONTENT_JSON_BULK "Content-Type: application/x-ndjson; charset=utf-8"
|
||||
|
||||
static rsRetVal
|
||||
curlSetup(wrkrInstanceData_t *pWrkrData, instanceData *pData)
|
||||
{
|
||||
if (pData->bulkmode) {
|
||||
pWrkrData->curlHeader = curl_slist_append(NULL, CONTENT_JSON_BULK);
|
||||
} else {
|
||||
pWrkrData->curlHeader = curl_slist_append(NULL, CONTENT_JSON);
|
||||
}
|
||||
pWrkrData->curlHeader = curl_slist_append(NULL, CONTENT_JSON);
|
||||
pWrkrData->curlPostHandle = curl_easy_init();
|
||||
if (pWrkrData->curlPostHandle == NULL) {
|
||||
return RS_RET_OBJ_CREATION_FAILED;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user