Skip to content
Myr

fix "trim prefix" debug message in express:router

Before adoption: this commit came in with the history the project adopted, so no landing records it.

closes #2177

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent ac573cf · Browse files · 2 files+9 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+9 added−2 removed

  • other:+9 added−2 removed

2 files+9 added−2 removed

modified:lib/router/index.js+4 added-2 removed
224 unmodified lines
225 if (c && '/' != c && '.' != c) return next(err);226227 // Trim off the part of the url that matches the route228 // middleware (.use stuff) needs to have the path stripped229 debug('trim prefix (%s) from url %s', removed, req.url);229 removed = layerPath;230 if (removed.length) {231 debug('trim prefix (%s) from url %s', layerPath, req.url);231 req.url = protohost + req.url.substr(protohost.length + removed.length);232 req.url = protohost + req.url.substr(protohost.length + removed.length);233 }234235 // Ensure leading slash236 if (!fqdn && req.url[0] !== '/') {237 req.url = '/' + req.url;
215 unmodified lines
modified:History.md+5 added
1unreleased2==========34 * fix "trim prefix" debug message in `express:router`564.4.3 / 2014-06-117==================89 * fix persistence of modified `req.params[name]` from `app.param()`
1633 unmodified lines