express
Advanced tools
Comparing version 4.16.1 to 4.16.2
@@ -318,4 +318,8 @@ /*! | ||
// single value, but this is to be safe. | ||
proto = this.get('X-Forwarded-Proto') || proto; | ||
return proto.split(/\s*,\s*/)[0]; | ||
var header = this.get('X-Forwarded-Proto') || proto | ||
var index = header.indexOf(',') | ||
return index !== -1 | ||
? header.substring(0, index).trim() | ||
: header.trim() | ||
}); | ||
@@ -322,0 +326,0 @@ |
@@ -181,6 +181,9 @@ /*! | ||
if (chunk !== undefined) { | ||
if (!generateETag && chunk.length < 1000) { | ||
if (Buffer.isBuffer(chunk)) { | ||
// get length of Buffer | ||
len = chunk.length | ||
} else if (!generateETag && chunk.length < 1000) { | ||
// just calculate length when no ETag + small chunk | ||
len = Buffer.byteLength(chunk, encoding) | ||
} else if (!Buffer.isBuffer(chunk)) { | ||
} else { | ||
// convert chunk to Buffer and calculate | ||
@@ -190,5 +193,2 @@ chunk = Buffer.from(chunk, encoding) | ||
len = chunk.length | ||
} else { | ||
// get length of Buffer | ||
len = chunk.length | ||
} | ||
@@ -195,0 +195,0 @@ |
{ | ||
"name": "express", | ||
"description": "Fast, unopinionated, minimalist web framework", | ||
"version": "4.16.1", | ||
"version": "4.16.2", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
@@ -93,7 +93,7 @@ "contributors": [ | ||
"lint": "eslint .", | ||
"test": "mocha --require test/support/env --reporter spec --bail --check-leaks test/ test/acceptance/", | ||
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks test/ test/acceptance/", | ||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks test/ test/acceptance/", | ||
"test-tap": "mocha --require test/support/env --reporter tap --check-leaks test/ test/acceptance/" | ||
"test": "mocha --require test/support/env --reporter spec --bail --check-leaks --no-exit test/ test/acceptance/", | ||
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks --no-exit test/ test/acceptance/", | ||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks --no-exit test/ test/acceptance/", | ||
"test-tap": "mocha --require test/support/env --reporter tap --check-leaks --no-exit test/ test/acceptance/" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
204935
3403