YUKI Hiroshi
null+****@clear*****
Thu Mar 20 12:38:39 JST 2014
YUKI Hiroshi 2014-03-20 12:38:39 +0900 (Thu, 20 Mar 2014) New Revision: 8863276eb9a84e42d4c7de0987731a3d67745912 https://github.com/droonga/express-droonga/commit/8863276eb9a84e42d4c7de0987731a3d67745912 Message: Add a skeleton of a connect middleware Added files: lib/response-cache.js Added: lib/response-cache.js (+14 -0) 100644 =================================================================== --- /dev/null +++ lib/response-cache.js 2014-03-20 12:38:39 +0900 (e2d15f2) @@ -0,0 +1,14 @@ +exports = module.exports = function() { + return function(request, response, next) { + var originalWrite = response.write; + var originalEnd = response.end; + + response.write = function(chunk, encoding) { + return originalWrite.call(response, chunk, encoding); + }; + + response.end = function(chunk, encoding) { + return originalEnd.call(response, chunk, encoding); + }; + }; +}; -------------- next part -------------- HTML����������������������������...Download