Comparing version 3.8.0 to 3.8.1
'use strict'; | ||
var http = require('http'); | ||
var https = require('https'); | ||
var parseUrl = require('url').parse; | ||
@@ -19,8 +20,12 @@ var once = require('./once'); | ||
module.exports = function (baseUrl, agent, agentOptions) { | ||
if (!agent && http.Agent) agent = new http.Agent(agentOptions); // server only | ||
var baseUrlParts = rawCopy(parseUrl(baseUrl)); | ||
var isSsl = baseUrlParts.protocol === 'https:'; | ||
if (!agent) { | ||
agent = new (isSsl ? https : http).Agent(agentOptions); | ||
} | ||
var queue = new LinkedList(); | ||
var maxTasks = typeof agent.maxSockets === 'number' ? agent.maxSockets * 2 : Infinity; | ||
var activeTasks = 0; | ||
var baseUrlParts = rawCopy(parseUrl(baseUrl)); | ||
@@ -56,3 +61,3 @@ function drainQueue() { | ||
}); | ||
var req = http.request(options, function (res) { | ||
var req = (isSsl ? https : http).request(options, function (res) { | ||
var data = []; | ||
@@ -59,0 +64,0 @@ res.on('data', function (b) { |
{ | ||
"name": "arangojs", | ||
"version": "3.8.0", | ||
"version": "3.8.1", | ||
"description": "The official ArangoDB JavaScript driver.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
161878
1653
2