fix pluginhandler http protocol #6362

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458 2024-09-06 11:00:41 +01:00
parent d367b2ed87
commit 390991123a
1 changed files with 2 additions and 2 deletions

View File

@ -364,7 +364,7 @@ module.exports.pluginHandler = function (parent) {
if (force_url != null) dl_url = force_url;
var url = require('url');
var q = url.parse(dl_url, true);
var http = (q.protocol == "http") ? require('http') : require('https');
var http = (q.protocol == "http:") ? require('http') : require('https');
var opts = {
path: q.pathname,
host: q.hostname,
@ -457,7 +457,7 @@ module.exports.pluginHandler = function (parent) {
if (plugin.versionHistoryUrl == null) reject("No version history available for this plugin.");
var url = require('url');
var q = url.parse(plugin.versionHistoryUrl, true);
var http = (q.protocol == 'http') ? require('http') : require('https');
var http = (q.protocol == 'http:') ? require('http') : require('https');
var opts = {
path: q.pathname,
host: q.hostname,