New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

express

Package Overview
Dependencies
Maintainers
7
Versions
282
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express - npm Package Compare versions

Comparing version 3.17.8 to 3.18.0

31

History.md

@@ -0,1 +1,32 @@

3.18.0 / 2014-10-17
===================
* Use `content-disposition` module for `res.attachment`/`res.download`
- Sends standards-compliant `Content-Disposition` header
- Full Unicode support
* Use `etag` module to generate `ETag` headers
* deps: connect@2.27.0
- Use `http-errors` module for creating errors
- Use `utils-merge` module for merging objects
- deps: body-parser@~1.9.0
- deps: compression@~1.2.0
- deps: connect-timeout@~1.4.0
- deps: debug@~2.1.0
- deps: depd@~1.0.0
- deps: express-session@~1.9.0
- deps: finalhandler@0.3.1
- deps: method-override@~2.3.0
- deps: morgan@~1.4.0
- deps: response-time@~2.2.0
- deps: serve-favicon@~2.1.6
- deps: serve-index@~1.5.0
- deps: serve-static@~1.7.0
* deps: debug@~2.1.0
- Implement `DEBUG_FD` env variable support
* deps: depd@~1.0.0
* deps: send@0.10.0
- deps: debug@~2.1.0
- deps: depd@~1.0.0
- deps: etag@~1.5.0
3.17.8 / 2014-10-15

@@ -2,0 +33,0 @@ ===================

21

lib/response.js

@@ -5,2 +5,3 @@ /**

var contentDisposition = require('content-disposition');
var deprecate = require('depd')('express');

@@ -417,5 +418,5 @@ var escapeHtml = require('escape-html');

res.download = function(path, filename, fn){
res.download = function download(path, filename, fn) {
// support function as second arg
if ('function' == typeof filename) {
if (typeof filename === 'function') {
fn = filename;

@@ -426,3 +427,5 @@ filename = null;

filename = filename || path;
this.set('Content-Disposition', 'attachment; filename="' + basename(filename) + '"');
this.set('Content-Disposition', contentDisposition(filename));
return this.sendfile(path, fn);

@@ -550,7 +553,9 @@ };

res.attachment = function(filename){
if (filename) this.type(extname(filename));
this.set('Content-Disposition', filename
? 'attachment; filename="' + basename(filename) + '"'
: 'attachment');
res.attachment = function attachment(filename) {
if (filename) {
this.type(extname(filename));
}
this.set('Content-Disposition', contentDisposition(filename));
return this;

@@ -557,0 +562,0 @@ };

@@ -6,6 +6,5 @@

var crc = require('crc').crc32;
var mime = require('connect').mime
, proxyaddr = require('proxy-addr')
, crypto = require('crypto');
var etag = require('etag');
var mime = require('connect').mime;
var proxyaddr = require('proxy-addr');
var typer = require('media-typer');

@@ -28,13 +27,8 @@

exports.etag = function etag(body, encoding){
if (body.length === 0) {
// fast-path empty body
return '"1B2M2Y8AsgTpgAmY7PhCfg=="'
}
exports.etag = function (body, encoding) {
var buf = !Buffer.isBuffer(body)
? new Buffer(body, encoding)
: body;
var hash = crypto
.createHash('md5')
.update(body, encoding)
.digest('base64')
return '"' + hash + '"'
return etag(buf, {weak: false});
};

@@ -52,12 +46,7 @@

exports.wetag = function wetag(body, encoding){
if (body.length === 0) {
// fast-path empty body
return 'W/"0-0"'
}
var buf = !Buffer.isBuffer(body)
? new Buffer(body, encoding)
: body;
var buf = Buffer.isBuffer(body)
? body
: new Buffer(body, encoding)
var len = buf.length
return 'W/"' + len.toString(16) + '-' + crc(buf) + '"'
return etag(buf, {weak: true});
};

@@ -64,0 +53,0 @@

{
"name": "express",
"description": "Sinatra inspired web development framework",
"version": "3.17.8",
"version": "3.18.0",
"author": "TJ Holowaychuk <tj@vision-media.ca>",

@@ -14,2 +14,5 @@ "contributors": [

],
"license": "MIT",
"repository": "strongloop/express",
"homepage": "http://expressjs.com/",
"keywords": [

@@ -26,14 +29,12 @@ "express",

],
"repository": "strongloop/express",
"license": "MIT",
"homepage": "http://expressjs.com/",
"dependencies": {
"basic-auth": "1.0.0",
"connect": "2.26.6",
"connect": "2.27.0",
"content-disposition": "0.5.0",
"commander": "1.3.2",
"cookie-signature": "1.0.5",
"crc": "3.0.0",
"debug": "~2.0.0",
"depd": "0.4.5",
"debug": "~2.1.0",
"depd": "~1.0.0",
"escape-html": "1.0.1",
"etag": "~1.5.0",
"fresh": "0.2.4",

@@ -46,3 +47,3 @@ "media-typer": "0.3.0",

"range-parser": "~1.0.2",
"send": "0.9.3",
"send": "0.10.0",
"vary": "~1.0.0",

@@ -59,3 +60,3 @@ "cookie": "0.1.2",

"ejs": "~1.0.0",
"jade": "~1.6.0",
"jade": "~1.7.0",
"hjs": "~0.0.6",

@@ -70,4 +71,11 @@ "marked": "0.3.2"

},
"files": [
"LICENSE",
"History.md",
"Readme.md",
"index.js",
"bin/",
"lib/"
],
"scripts": {
"prepublish": "npm prune",
"test": "mocha --require test/support/env --reporter dot --check-leaks test/ test/acceptance/",

@@ -74,0 +82,0 @@ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks test/ test/acceptance/",

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