Skip to content
Myr

Fixed routeProvides() spec

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

authored by visionmedia · committed by visionmedia · parent 6dc1715 · Browse files · 2 files+4 added−4 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+4 added−4 removed

  • tests:+3 added−3 removed
  • other:+1 added−1 removed

2 files+4 added−4 removed

modified:lib/express.core.js+1 added-1 removed
476 unmodified lines
477 if (!route.options.provides) return true478 if (route.options.provides.constructor != Array) 479 route.options.provides = [route.options.provides]480 for (i = 0, len = route.options.provides.length; i < len; ++i)481 if (request.headers.accept.match(route.options.provides[i]))481 if (request.headers.accept && request.headers.accept.match(route.options.provides[i]))482 return true483 return false484 },485
100 unmodified lines
modified:spec/spec.routing.js+3 added-3 removed