From 007dc6fa6d365e3d15683513bd1ed4ef4751860d Mon Sep 17 00:00:00 2001 From: neptunian Date: Fri, 13 Dec 2019 22:48:34 -0500 Subject: [PATCH] delete request.headers['transfer-encoding'] being passed through from epm request --- x-pack/legacy/plugins/epm/server/datasources/create.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/legacy/plugins/epm/server/datasources/create.ts b/x-pack/legacy/plugins/epm/server/datasources/create.ts index 22fe2578485d9c..97d7520cd264f5 100644 --- a/x-pack/legacy/plugins/epm/server/datasources/create.ts +++ b/x-pack/legacy/plugins/epm/server/datasources/create.ts @@ -99,7 +99,7 @@ async function saveDatasourceReferences(options: { // or something similar, but it's a class not an object so many pieces are missing // we'd still need `user` from the request object, but that's not terrible // lacking that we make another http request to Ingest - await ingestDatasourceCreate({ request, datasource });; + await ingestDatasourceCreate({ request, datasource }); return toInstall; } @@ -170,7 +170,7 @@ async function ingestDatasourceCreate({ const apiPath = '/api/ingest/datasources'; const url = `${origin}${basePath}${apiPath}`; const body = { datasource }; - + delete request.headers['transfer-encoding']; return fetch(url, { method: 'post', body: JSON.stringify(body),