express-session
Advanced tools
Comparing version 1.7.2 to 1.7.3
@@ -0,1 +1,6 @@ | ||
1.7.3 / 2014-08-05 | ||
================== | ||
* Fix `res.end` patch to call correct upstream `res.write` | ||
1.7.2 / 2014-07-27 | ||
@@ -2,0 +7,0 @@ ================== |
21
index.js
@@ -182,5 +182,6 @@ /*! | ||
// proxy end() to commit the session | ||
var end = res.end; | ||
var _end = res.end; | ||
var _write = res.write; | ||
var ended = false; | ||
res.end = function(chunk, encoding){ | ||
res.end = function end(chunk, encoding) { | ||
if (ended) { | ||
@@ -210,3 +211,3 @@ return false; | ||
if (sync) { | ||
ret = end.call(res, chunk, encoding); | ||
ret = _end.call(res, chunk, encoding); | ||
sync = false; | ||
@@ -216,7 +217,7 @@ return; | ||
end.call(res); | ||
_end.call(res); | ||
}); | ||
if (sync) { | ||
ret = res.write(chunk, encoding); | ||
ret = _write.call(res, chunk, encoding); | ||
sync = false; | ||
@@ -231,3 +232,3 @@ } | ||
debug('no session'); | ||
return end.call(res, chunk, encoding); | ||
return _end.call(res, chunk, encoding); | ||
} | ||
@@ -247,3 +248,3 @@ | ||
if (sync) { | ||
ret = end.call(res, chunk, encoding); | ||
ret = _end.call(res, chunk, encoding); | ||
sync = false; | ||
@@ -253,7 +254,7 @@ return; | ||
end.call(res); | ||
_end.call(res); | ||
}); | ||
if (sync) { | ||
ret = res.write(chunk, encoding); | ||
ret = _write.call(res, chunk, encoding); | ||
sync = false; | ||
@@ -265,3 +266,3 @@ } | ||
return end.call(res, chunk, encoding); | ||
return _end.call(res, chunk, encoding); | ||
}; | ||
@@ -268,0 +269,0 @@ |
{ | ||
"name": "express-session", | ||
"version": "1.7.2", | ||
"version": "1.7.3", | ||
"description": "Simple session middleware for Express", | ||
@@ -5,0 +5,0 @@ "author": "TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32788
782