Skip to content
Myr

Normalizing route paths

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

authored by visionmedia · committed by visionmedia · parent 62296c0 · Browse files · 1 file+2 added−0 removed
This commit

State

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

Diff stats

1 file+2 added−0 removed

  • other:+2 added−0 removed

1 file+2 added−0 removed

modified:lib/express.core.js+2 added
43 unmodified lines
44 45 start : function(port) {46 this.server.listen(port || 3000, function(request, response){47 Express.request = request48 Express.request.uri.path = Express.normalizePath(Express.request.uri.path)49 Express.response.body = Express.callRouteFor(request)50 response.sendHeader(Express.response.status, Express.hashToArray(Express.response.headers))51 response.sendBody(Express.response.body || '')52 response.finish()
130 unmodified lines
183 },184 185 routeFunctionFor : function(method) {186 return function(path, callback) {187 if (typeof path == 'string') path = Express.normalizePath(path)188 Express.routes.push({189 path : path,190 method : method,191 callback : callback
24 unmodified lines