Do not cache 404 responses.

This makes DOS attacks way to easy. This really needs to be replaced with an LRU (e.g. a prebuilt middleware).
pull/541/head
Chad Weider 2012-03-04 15:13:15 -08:00
parent 0930b64c4e
commit 29548244fd
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ CachingMiddleware.prototype = new function () {
&& new Date(res.getHeader('last-modified')));
res.writeHead = old_res.writeHead;
if (status == 200 || status == 404) {
if (status == 200) {
// Update cache
var buffer = '';