HttpRequest: unable to overide url with https url

This commit is contained in:
Nicholas O'Leary 2013-10-23 00:03:09 +01:00
parent ae13db90a9
commit dc0d62cb28
1 changed files with 3 additions and 1 deletions

View File

@ -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) {