From dc0d62cb288d4a0c8cfb1fc618d171702804276e Mon Sep 17 00:00:00 2001 From: Nicholas O'Leary Date: Wed, 23 Oct 2013 00:03:09 +0100 Subject: [PATCH] HttpRequest: unable to overide url with https url --- nodes/io/21-httpin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nodes/io/21-httpin.js b/nodes/io/21-httpin.js index 1bc527fda..109638cf9 100644 --- a/nodes/io/21-httpin.js +++ b/nodes/io/21-httpin.js @@ -79,7 +79,9 @@ function HTTPRequest(n) { var httplib = (/^https/.test(url))?https:http; var node = this; this.on("input",function(msg) { - + if (msg.url) { + httplib = (/^https/.test(msg.url))?https:http; + } var opts = urllib.parse(msg.url||url); opts.method = (msg.method||method).toUpperCase(); if (msg.headers) {