From b3684a70b58c9d4a0f01fa1b27a98f7ae91f5901 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sat, 2 May 2015 22:20:46 +0100 Subject: [PATCH] Handle Buffer payloads in HTTP Response node --- nodes/core/io/21-httpin.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nodes/core/io/21-httpin.js b/nodes/core/io/21-httpin.js index 3715afb6d..5ad1d5586 100644 --- a/nodes/core/io/21-httpin.js +++ b/nodes/core/io/21-httpin.js @@ -149,6 +149,8 @@ module.exports = function(RED) { var len; if (msg.payload == null) { len = 0; + } else if (Buffer.isBuffer(msg.payload)) { + len = msg.payload.length; } else if (typeof msg.payload == "number") { len = Buffer.byteLength(""+msg.payload); } else {