Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

woodland

Package Overview
Dependencies
Maintainers
1
Versions
352
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

woodland - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

33

lib/woodland.js

@@ -116,6 +116,15 @@ "use strict";

function last (err) {
let errorCode, status;
let last = err => {
let allowed, errorCode, status;
if (!err) {
// Double checking `this.allows()` (middleware memoization)
if (!req.allow) {
allowed = this.allows(req.parsed.pathname, req.host);
if (allowed) {
req.allow = allowed;
}
}
deferred.reject(req.allow.indexOf("GET") > -1 ? new Error(405) : new Error(404));

@@ -127,3 +136,3 @@ } else {

}
}
};

@@ -133,17 +142,17 @@ let next = err => {

let arity = 3,
step = middleware.next();
iter = middleware.next();
if (!res._header && !step.done) {
if (!res.finished && !iter.done) {
if (err) {
arity = utility.getArity(step.value);
arity = utility.getArity(iter.value);
do {
arity = utility.getArity(step.value);
} while (arity < 4 && (step = middleware.next()) && !step.done);
arity = utility.getArity(iter.value);
} while (arity < 4 && (iter = middleware.next()) && !iter.done);
}
if (!step.done) {
if (!iter.done) {
if (err) {
if (arity === 4) {
try {
step.value(err, req, res, next);
iter.value(err, req, res, next);
} catch (e) {

@@ -157,3 +166,3 @@ next(e);

try {
step.value(req, res, next);
iter.value(req, res, next);
} catch (e) {

@@ -166,3 +175,3 @@ next(e);

}
} else if (!res._header) {
} else if (!res.finished) {
last(err);

@@ -169,0 +178,0 @@ }

{
"name": "woodland",
"version": "1.0.10",
"version": "1.0.11",
"description": "Lightweight HTTP/HTTPS router with virtual hosts",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc