mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
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.
This commit is contained in:
parent
3d8d6953ec
commit
3ec35ed119
@ -135,7 +135,7 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
var payload = null;
|
var payload = null;
|
||||||
|
|
||||||
if (typeof msg.payload !== "undefined") {
|
if (method !== 'GET' && typeof msg.payload !== "undefined") {
|
||||||
if (typeof msg.payload === "string" || Buffer.isBuffer(msg.payload)) {
|
if (typeof msg.payload === "string" || Buffer.isBuffer(msg.payload)) {
|
||||||
payload = msg.payload;
|
payload = msg.payload;
|
||||||
} else if (typeof msg.payload == "number") {
|
} else if (typeof msg.payload == "number") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user