1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Handle null response payloads

This commit is contained in:
Nick O'Leary 2014-07-09 09:46:10 +01:00
parent 8e24a958b7
commit a7e7254317

View File

@ -130,7 +130,9 @@ console.log(err.stack);
} else {
if (msg.res.get('content-length') == null) {
var len;
if (typeof msg.payload == "number") {
if (msg.payload ==== null) {
len = 0;
} else if (typeof msg.payload == "number") {
len = Buffer.byteLength(""+msg.payload);
} else {
len = Buffer.byteLength(msg.payload);