Skip to content
Myr

Passing request / response to response hook

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

authored by visionmedia · committed by visionmedia · parent 2e99bc9 · Browse files · 1 file+2 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

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:lib/express.core.js+2 added-2 removed
39 unmodified lines
40 response : [41 42 // Content length43 44 function() {44 function(request, response) {45 Express.header('Content-Length', (Express.response.body || '').length)46 }47 ]48 },
27 unmodified lines
76 request.uri.params = Express.parseNestedParams(request.uri.params)77 request.uri.path = Express.normalizePath(request.uri.path)78 Express.response.body = Express.callRouteFor(request)79 Express.prepareCookie()80 Express.hook('response')80 Express.hook('response', request, response)81 response.sendHeader(Express.response.status, Express.hashToArray(Express.response.headers))82 response.sendBody(Express.response.body || '')83 response.finish()84 })
448 unmodified lines