This commit is contained in:
libccy 2016-08-06 18:51:24 +08:00
parent 3b620c0ffe
commit 300a01a33f
1 changed files with 1 additions and 1 deletions

View File

@ -3553,7 +3553,7 @@
onerror(); onerror();
} }
if(!lib.node.http) lib.node.http=require('http'); if(!lib.node.http) lib.node.http=require('http');
if(!lib.node.https) lib.node.http=require('https'); if(!lib.node.https) lib.node.https=require('https');
var request = (url.indexOf('https'==0)?lib.node.https:lib.node.http).get(url, function(response) { var request = (url.indexOf('https'==0)?lib.node.https:lib.node.http).get(url, function(response) {
var stream=response.pipe(file); var stream=response.pipe(file);
stream.on('finish',onsuccess); stream.on('finish',onsuccess);