express-session
Advanced tools
+5
-0
@@ -0,1 +1,6 @@ | ||
| 1.7.4 / 2014-08-05 | ||
| ================== | ||
| * Fix response end delay for non-chunked responses | ||
| 1.7.3 / 2014-08-05 | ||
@@ -2,0 +7,0 @@ ================== |
+43
-29
@@ -190,2 +190,4 @@ /*! | ||
| ended = true; | ||
| var ret; | ||
@@ -198,4 +200,40 @@ var sync = true; | ||
| ended = true; | ||
| function writeend() { | ||
| if (sync) { | ||
| ret = _end.call(res, chunk, encoding); | ||
| sync = false; | ||
| return; | ||
| } | ||
| _end.call(res); | ||
| } | ||
| function writetop() { | ||
| if (!sync) { | ||
| return ret; | ||
| } | ||
| var contentLength = Number(res.getHeader('Content-Length')); | ||
| if (!isNaN(contentLength) && contentLength > 0) { | ||
| // measure chunk | ||
| chunk = !Buffer.isBuffer(chunk) | ||
| ? new Buffer(chunk, encoding) | ||
| : chunk; | ||
| encoding = undefined; | ||
| if (chunk.length !== 0) { | ||
| debug('split response'); | ||
| ret = _write.call(res, chunk.slice(0, chunk.length - 1)); | ||
| chunk = chunk.slice(chunk.length - 1, chunk.length); | ||
| return ret; | ||
| } | ||
| } | ||
| ret = _write.call(res, chunk, encoding); | ||
| sync = false; | ||
| return ret; | ||
| } | ||
| if (shouldDestroy(req)) { | ||
@@ -210,18 +248,6 @@ // destroy session | ||
| debug('destroyed'); | ||
| if (sync) { | ||
| ret = _end.call(res, chunk, encoding); | ||
| sync = false; | ||
| return; | ||
| } | ||
| _end.call(res); | ||
| writeend(); | ||
| }); | ||
| if (sync) { | ||
| ret = _write.call(res, chunk, encoding); | ||
| sync = false; | ||
| } | ||
| return ret; | ||
| return writetop(); | ||
| } | ||
@@ -245,18 +271,6 @@ | ||
| debug('saved'); | ||
| if (sync) { | ||
| ret = _end.call(res, chunk, encoding); | ||
| sync = false; | ||
| return; | ||
| } | ||
| _end.call(res); | ||
| writeend(); | ||
| }); | ||
| if (sync) { | ||
| ret = _write.call(res, chunk, encoding); | ||
| sync = false; | ||
| } | ||
| return ret; | ||
| return writetop(); | ||
| } | ||
@@ -263,0 +277,0 @@ |
+1
-1
| { | ||
| "name": "express-session", | ||
| "version": "1.7.3", | ||
| "version": "1.7.4", | ||
| "description": "Simple session middleware for Express", | ||
@@ -5,0 +5,0 @@ "author": "TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
33323
1.63%794
1.53%