(req, res)
| 627 | // If the router does not match any route, every request will land here |
| 628 | // req and res are Node.js core objects |
| 629 | function defaultRoute (req, res) { |
| 630 | if (req.headers['accept-version'] !== undefined) { |
| 631 | // we remove the accept-version header for performance result |
| 632 | // because we do not want to go through the constraint checking |
| 633 | // the usage of symbol here to prevent any collision on custom header name |
| 634 | req.headers[kRequestAcceptVersion] = req.headers['accept-version'] |
| 635 | req.headers['accept-version'] = undefined |
| 636 | } |
| 637 | fourOhFour.router.lookup(req, res) |
| 638 | } |
| 639 | |
| 640 | function onBadUrl (path, req, res) { |
| 641 | if (options.frameworkErrors) { |
nothing calls this directly
no outgoing calls
no test coverage detected