From ce4115a2aeb0259bdf2c026b56a56d2195f3f47a Mon Sep 17 00:00:00 2001 From: alevkon Date: Mon, 8 Dec 2014 14:34:07 +0300 Subject: [PATCH 1/2] allow get parameters in the url --- lib/wget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wget.js b/lib/wget.js index 1b55d3e..bfc1cd3 100644 --- a/lib/wget.js +++ b/lib/wget.js @@ -24,7 +24,7 @@ function download(src, output, options) { protocol: srcUrl.protocol, host: srcUrl.hostname, port: srcUrl.port, - path: srcUrl.pathname, + path: srcUrl.pathname + srcUrl.search, proxy: options?options.proxy:undefined, method: 'GET' }, function(res) { From 51869e46a6dc3c331cb4d5afbd67535a4a1702b7 Mon Sep 17 00:00:00 2001 From: alevkon Date: Mon, 8 Dec 2014 14:38:18 +0300 Subject: [PATCH 2/2] fix the case when srcUrl.search is undefined --- lib/wget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wget.js b/lib/wget.js index bfc1cd3..23960cc 100644 --- a/lib/wget.js +++ b/lib/wget.js @@ -24,7 +24,7 @@ function download(src, output, options) { protocol: srcUrl.protocol, host: srcUrl.hostname, port: srcUrl.port, - path: srcUrl.pathname + srcUrl.search, + path: srcUrl.pathname + (srcUrl.search || ""), proxy: options?options.proxy:undefined, method: 'GET' }, function(res) {