From 3ec35ed119954bc0e778dd223887e703a629b22b Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 31 Jan 2018 23:39:26 +0000 Subject: [PATCH] Do not include payload in GET requests Fixes #1598 This regression was caused by #1531 - allowing the http request node use any method. The full fix is to identify which common verbs must not include a payload and exclude them. GET needs fixing right now. --- nodes/core/io/21-httprequest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/core/io/21-httprequest.js b/nodes/core/io/21-httprequest.js index 1a3707344..52cef215a 100644 --- a/nodes/core/io/21-httprequest.js +++ b/nodes/core/io/21-httprequest.js @@ -135,7 +135,7 @@ module.exports = function(RED) { } var payload = null; - if (typeof msg.payload !== "undefined") { + if (method !== 'GET' && typeof msg.payload !== "undefined") { if (typeof msg.payload === "string" || Buffer.isBuffer(msg.payload)) { payload = msg.payload; } else if (typeof msg.payload == "number") {