fixes issue #707

Don't set cached cookies
pull/712/head
Edy 2012-05-17 12:08:19 +02:00
parent 916e52a1eb
commit e8639d87ce
1 changed files with 3 additions and 0 deletions

View File

@ -73,6 +73,9 @@ CachingMiddleware.prototype = new function () {
var _headers = {};
old_res.setHeader = res.setHeader;
res.setHeader = function (key, value) {
// Don't set cookies, see issue #707
if (key.toLowerCase() === 'set-cookie') return;
_headers[key.toLowerCase()] = value;
old_res.setHeader.call(res, key, value);
};