Skip to content

Commit

Permalink
restore req/res proto
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Apr 26, 2012
1 parent 858e4dc commit 58d522d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/application.js
Expand Up @@ -134,6 +134,8 @@ app.use = function(route, fn){
var orig = req.app;
app.handle(req, res, function(err){
req.app = res.app = orig;
req.__proto__ = orig.request;
res.__proto__ = orig.response;
next(err);
});
};
Expand Down
2 changes: 0 additions & 2 deletions lib/middleware.js
Expand Up @@ -18,8 +18,6 @@
exports.init = function(app){
return function expressInit(req, res, next){
req.app = res.app = app;
if (req.next) return next();

res.setHeader('X-Powered-By', 'Express');
req.res = res;
res.req = req;
Expand Down

0 comments on commit 58d522d

Please sign in to comment.