Comparing version 0.1.5 to 0.1.6
@@ -12,5 +12,3 @@ /* | ||
var debug = false, | ||
retry_failed = false; | ||
var debug = false; | ||
var defaults = {}; | ||
@@ -103,15 +101,18 @@ | ||
exports.setup = function(opts) { | ||
defaults = opts; | ||
exports.setup = function(options) { | ||
defaults = options; | ||
if (opts.max_active || opts.max_sockets) | ||
agent.maxSockets = (opts.max_active || opts.max_sockets); | ||
if (options.max_active || options.max_sockets) | ||
agent.maxSockets = (options.max_active || options.max_sockets); | ||
if (opts.debug) | ||
debug = opts.debug; | ||
if (options.debug) | ||
debug = options.debug; | ||
if (opts.retry_failed) | ||
retry_failed = opts.retry_failed; | ||
return function(req, res) { | ||
var opts = arguments[2] || {}; | ||
var cb = arguments[3]; | ||
return exports.send; | ||
opts.retry_failed = options.retry_failed; | ||
exports.send(req, res, opts, cb); | ||
}; | ||
} | ||
@@ -173,6 +174,6 @@ | ||
if (!res.headersSent) { | ||
if (retry_failed === true && !opts.retried) { | ||
if (opts.retry_failed === true) { | ||
// retry is enabled, so wait one second and resend the request | ||
return setTimeout(function() { | ||
opts.retried = true; | ||
opts.retry_failed = false; | ||
exports.send(req, res, opts, cb); | ||
@@ -179,0 +180,0 @@ }, 1000); |
{ | ||
"name": "under", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Fast reverse HTTP proxy with load balancing and queue support.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
var http = require('http'), | ||
needle = require('needle'), | ||
spawn = require('child_process').spawn, | ||
should = require('should'), | ||
@@ -5,0 +4,0 @@ sinon = require('sinon'), |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
22561
15
731