From 771342989e5a5a3366a993c84fdebaaa5f5cd08b Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sun, 26 Apr 2015 08:50:42 +0100 Subject: [PATCH] HTTP Request - handle null url Fixes #632 --- nodes/core/io/21-httpin.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nodes/core/io/21-httpin.js b/nodes/core/io/21-httpin.js index e52a47599..1fd9f88fb 100644 --- a/nodes/core/io/21-httpin.js +++ b/nodes/core/io/21-httpin.js @@ -184,6 +184,10 @@ module.exports = function(RED) { if (isTemplatedUrl) { url = mustache.render(nodeUrl,msg); } + if (!url) { + node.error("No url specified",msg); + return; + } // url must start http:// or https:// so assume http:// if not set if (!((url.indexOf("http://")===0) || (url.indexOf("https://")===0))) { url = "http://"+url;