fix pluginhandler http protocol #6362
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 committed
Sep 6, 2024 at 11:00 UTC
390991123a566aba8b8c380b952c4e65c009396f
1 file changed
+2
-2
pluginHandler.js
+2
-2
@@ -364,7 +364,7 @@ module.exports.pluginHandler = function (parent) {
364
if (force_url != null) dl_url = force_url;
365
var url = require('url');
366
var q = url.parse(dl_url, true);
367
- var http = (q.protocol == "http") ? require('http') : require('https');
367
+ var http = (q.protocol == "http:") ? require('http') : require('https');
368
var opts = {
369
path: q.pathname,
370
host: q.hostname,
@@ -457,7 +457,7 @@ module.exports.pluginHandler = function (parent) {
457
if (plugin.versionHistoryUrl == null) reject("No version history available for this plugin.");
458
var url = require('url');
459
var q = url.parse(plugin.versionHistoryUrl, true);
460
- var http = (q.protocol == 'http') ? require('http') : require('https');
460
+ var http = (q.protocol == 'http:') ? require('http') : require('https');
461
var opts = {
462
path: q.pathname,
463
host: q.hostname,