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 {