Merge pull request #712 from edy-b/issue-707

Don't set cached cookies, fixes issue #707
pull/709/merge
John McLear 2012-05-17 04:57:22 -07:00
commit 1043d607d0
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);
};