From 701c7ec77b824c93260202f4f2d86d1b2a070138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Tue, 6 Aug 2019 11:19:35 -0300 Subject: [PATCH] parsersByEnconding to be compliance with datacontentenconding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- lib/bindings/http/receiver_binary_0_2.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/bindings/http/receiver_binary_0_2.js b/lib/bindings/http/receiver_binary_0_2.js index a91d855..5549211 100644 --- a/lib/bindings/http/receiver_binary_0_2.js +++ b/lib/bindings/http/receiver_binary_0_2.js @@ -16,6 +16,10 @@ parserByType[Constants.MIME_OCTET_STREAM] = { parse(payload) { return payload; } }; +const parsersByEncoding = {}; +parsersByEncoding[null] = parserByType; +parsersByEncoding[undefined] = parserByType; + const allowedContentTypes = []; allowedContentTypes.push(Constants.MIME_JSON); allowedContentTypes.push(Constants.MIME_OCTET_STREAM); @@ -58,7 +62,7 @@ setterByHeader[Constants.HEADER_CONTENT_TYPE] = { function Receiver(configuration) { this.receiver = new BinaryHTTPReceiver( - parserByType, + parsersByEncoding, setterByHeader, allowedContentTypes, requiredHeaders,