Skip to content
Myr

make sure req/res protos are app-specific

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

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 4f087df · Browse files · 3 files+7 added−17 removed
This commit

State

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

Diff stats

3 files+7 added−17 removed

  • tests:+1 added−1 removed
  • other:+6 added−16 removed

3 files+7 added−17 removed

modified:lib/application.js+2 added-4 removed
11 unmodified lines
12var connect = require('connect')13 , Router = require('./router')14 , toArray = require('./utils').toArray15 , methods = Router.methods.concat('del', 'all')16 , request = require('./request')17 , response = require('./response')16 , View = require('./view')17 , url = require('url')18 , utils = connect.utils19 , path = require('path')
89 unmodified lines
109 req.res = res;110 res.req = req;111 req.next = next;112115 req.__proto__ = request;116 res.__proto__ = response;113 req.__proto__ = self.request;114 res.__proto__ = self.response;115116 res.locals = function(obj){117 for (var key in obj) res.locals[key] = obj[key];118 return res;
473 unmodified lines
modified:lib/express.js+4 added-12 removed
modified:test/app.response.js+1 added-1 removed