Permalink
Browse files

perf: remove array read-past-end

  • Loading branch information...
dougwilson committed Sep 25, 2017
1 parent e702d9f commit b108a9d4815340e03cb2048e486d5ed0150b9f52
Showing with 3 additions and 2 deletions.
  1. +1 −0 HISTORY.md
  2. +2 −2 index.js
View
@@ -3,6 +3,7 @@ unreleased
* deps: finalhandler@1.1.0
- Use `res.headersSent` when available
* perf: remove array read-past-end
3.6.5 / 2017-09-22
==================
View
@@ -162,8 +162,8 @@ proto.handle = function handle(req, res, out) {
}
// skip if route match does not border "/", ".", or end
var c = path[route.length];
if (c !== undefined && '/' !== c && '.' !== c) {
var c = path.length > route.length && path[route.length];
if (c && c !== '/' && c !== '.') {
return next(err);
}

0 comments on commit b108a9d

Please sign in to comment.