Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-session

Package Overview
Dependencies
Maintainers
3
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-session - npm Package Compare versions

Comparing version 1.7.3 to 1.7.4

5

History.md

@@ -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 @@ ==================

72

index.js

@@ -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 @@

{
"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)",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc