Merge tag '3.21.0'
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parents fce3d14, 115dbe1 · Browse files · 4 files·+110 added−25 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+110 added−25 removed
- tests:+16 added−16 removed
- other:+94 added−9 removed
Provenance
- Commit
3d2ecdd- Tree
fa09b46- Author
Douglas Christopher Wilson <doug@somethingdoug.com>- Committer
Douglas Christopher Wilson <doug@somethingdoug.com>- Parent 1
fce3d14- Parent 2
115dbe1
4 files changed+110 added−25 removed
modified:test/res.send.js+8 added-8 removed
120 unmodified lines121 });122 123 request(app)124 .get('/')125- .expect('ETag', 'W/"3e7-8084ccd1"')125+ .expect('ETag', 'W/"3e7-VYgCBglFKiDVAcpzPNt4Sg"')126 .expect(200, done);127 })128 129 it('should not override Content-Type', function(done){63 unmodified lines193 });194 195 request(app)196 .get('/')197- .expect('ETag', 'W/"3e7-8084ccd1"')197+ .expect('ETag', 'W/"3e7-VYgCBglFKiDVAcpzPNt4Sg"')198 .expect(200, done);199 })200 201 it('should not override Content-Type', function(done){155 unmodified lines357 app.enable('etag');358 359 request(app)360 .get('/')361- .expect('ETag', 'W/"c-5aee35d8"')361+ .expect('ETag', 'W/"c-ZUfd0NJ26qwjlKF4r8qb2g"')362 .expect(200, done);363 });364 365 methods.forEach(function (method) {7 unmodified lines373 });374 375 request(app)376 [method]('/')377- .expect('ETag', 'W/"c-5aee35d8"')377+ .expect('ETag', 'W/"c-ZUfd0NJ26qwjlKF4r8qb2g"')378 .expect(200, done);379 })380 });381 7 unmodified lines389 app.enable('etag');390 391 request(app)392 .get('/')393- .expect('ETag', 'W/"0-0"')393+ .expect('ETag', 'W/"0-1B2M2Y8AsgTpgAmY7PhCfg"')394 .expect(200, done);395 })396 397 it('should send ETag for long response', function (done) {7 unmodified lines405 app.enable('etag');406 407 request(app)408 .get('/')409- .expect('ETag', 'W/"3e7-8084ccd1"')409+ .expect('ETag', 'W/"3e7-VYgCBglFKiDVAcpzPNt4Sg"')410 .expect(200, done);411 });412 413 it('should not override ETag when manually set', function (done) {73 unmodified lines487 });488 489 request(app)490 .get('/')491- .expect('ETag', '"Otu60XkfuuPskIiUxJY4cA=="')491+ .expect('ETag', '"d-Otu60XkfuuPskIiUxJY4cA"')492 .expect(200, done);493 })494 })495 8 unmodified lines504 });505 506 request(app)507 .get('/')508- .expect('ETag', 'W/"d-58988d13"')508+ .expect('ETag', 'W/"d-Otu60XkfuuPskIiUxJY4cA"')509 .expect(200, done)510 })511 })512 47 unmodified linesmodified:test/utils.js+8 added-8 removed
3 unmodified lines45678891011121313141516171819192021222324242526272820 unmodified lines495051525353545556575858596061626364646566676869697071727322 unmodified lines3 unmodified lines
describe('utils.etag(body, encoding)', function(){ it('should support strings', function(){ utils.etag('express!') .should.eql('"zZdv4imtWD49AHEviejT6A=="') .should.eql('"8-zZdv4imtWD49AHEviejT6A"') })
it('should support utf8 strings', function(){ utils.etag('express❤', 'utf8') .should.eql('"fsFba4IxwQS6h6Umb+FNxw=="') .should.eql('"a-fsFba4IxwQS6h6Umb+FNxw"') })
it('should support buffer', function(){ var buf = new Buffer('express!') utils.etag(buf) .should.eql('"zZdv4imtWD49AHEviejT6A=="'); .should.eql('"8-zZdv4imtWD49AHEviejT6A"'); })
it('should support empty string', function(){ utils.etag('') .should.eql('"1B2M2Y8AsgTpgAmY7PhCfg=="'); .should.eql('"0-1B2M2Y8AsgTpgAmY7PhCfg"'); })})
describe('utils.setCharset(type, charset)', function () {20 unmodified lines
describe('utils.wetag(body, encoding)', function(){ it('should support strings', function(){ utils.wetag('express!') .should.eql('W/"8-b8aabac7"') .should.eql('W/"8-zZdv4imtWD49AHEviejT6A"') })
it('should support utf8 strings', function(){ utils.wetag('express❤', 'utf8') .should.eql('W/"a-686b0af1"') .should.eql('W/"a-fsFba4IxwQS6h6Umb+FNxw"') })
it('should support buffer', function(){ var buf = new Buffer('express!') utils.wetag(buf) .should.eql('W/"8-b8aabac7"'); .should.eql('W/"8-zZdv4imtWD49AHEviejT6A"'); })
it('should support empty string', function(){ utils.wetag('') .should.eql('W/"0-0"'); .should.eql('W/"0-1B2M2Y8AsgTpgAmY7PhCfg"'); })})
describe('utils.isAbsolute()', function(){22 unmodified linesmodified:History.md+88 added-3 removed
1+unreleased2+==========3+4+ * deps: cookie@0.1.35+ - perf: deduce the scope of try-catch deopt6+ - perf: remove argument reassignments7+ * deps: escape-html@1.0.28+ * deps: etag@~1.7.09+ - Always include entity length in ETags for hash length extensions10+ - Generate non-Stats ETags using MD5 only (no longer CRC32)11+ - Improve stat performance by removing hashing12+ - Improve support for JXcore13+ - Remove base64 padding in ETags to shorten14+ - Support "fake" stats objects in environments without fs15+ - Use MD5 instead of MD4 in weak ETags over 1KB16+ * deps: fresh@0.3.017+ - Add weak `ETag` matching support18+ * deps: send@0.13.019+ - Allow Node.js HTTP server to set `Date` response header20+ - Fix incorrectly removing `Content-Location` on 304 response21+ - Improve the default redirect response headers22+ - Send appropriate headers on default error response23+ - Use `http-errors` for standard emitted errors24+ - Use `statuses` instead of `http` module for status messages25+ - deps: escape-html@1.0.226+ - deps: etag@~1.7.027+ - deps: fresh@0.3.028+ - deps: on-finished@~2.3.029+ - perf: enable strict mode30+ - perf: remove unnecessary array allocations31+32 4.12.4 / 2015-05-1733 ===================34 35 * deps: accepts@~1.2.7765 unmodified lines801 - `app.router()` - returns the app Router instance802 - `app.route()` - Proxy to the app's `Router#route()` method to create a new route803 - Router & Route - public API804 805+3.21.0 / 2015-06-18806+===================807+808+ * deps: basic-auth@1.0.2809+ - perf: enable strict mode810+ - perf: hoist regular expression811+ - perf: parse with regular expressions812+ - perf: remove argument reassignment813+ * deps: connect@2.30.0814+ - deps: body-parser@~1.13.1815+ - deps: bytes@2.1.0816+ - deps: compression@~1.5.0817+ - deps: cookie@0.1.3818+ - deps: cookie-parser@~1.3.5819+ - deps: csurf@~1.8.3820+ - deps: errorhandler@~1.4.0821+ - deps: express-session@~1.11.3822+ - deps: finalhandler@0.4.0823+ - deps: fresh@0.3.0824+ - deps: morgan@~1.6.0825+ - deps: serve-favicon@~2.3.0826+ - deps: serve-index@~1.7.0827+ - deps: serve-static@~1.10.0828+ - deps: type-is@~1.6.3829+ * deps: cookie@0.1.3830+ - perf: deduce the scope of try-catch deopt831+ - perf: remove argument reassignments832+ * deps: escape-html@1.0.2833+ * deps: etag@~1.7.0834+ - Always include entity length in ETags for hash length extensions835+ - Generate non-Stats ETags using MD5 only (no longer CRC32)836+ - Improve stat performance by removing hashing837+ - Improve support for JXcore838+ - Remove base64 padding in ETags to shorten839+ - Support "fake" stats objects in environments without fs840+ - Use MD5 instead of MD4 in weak ETags over 1KB841+ * deps: fresh@0.3.0842+ - Add weak `ETag` matching support843+ * deps: mkdirp@0.5.1844+ - Work in global strict mode845+ * deps: send@0.13.0846+ - Allow Node.js HTTP server to set `Date` response header847+ - Fix incorrectly removing `Content-Location` on 304 response848+ - Improve the default redirect response headers849+ - Send appropriate headers on default error response850+ - Use `http-errors` for standard emitted errors851+ - Use `statuses` instead of `http` module for status messages852+ - deps: escape-html@1.0.2853+ - deps: etag@~1.7.0854+ - deps: fresh@0.3.0855+ - deps: on-finished@~2.3.0856+ - perf: enable strict mode857+ - perf: remove unnecessary array allocations858+859 3.20.3 / 2015-05-17860 ===================861 862 * deps: connect@2.29.2841 unmodified lines1704 * update connect1705 * update commander1706 * jsonp: check if callback is a function1707 * router: wrap encodeURIComponent in a try/catch #1735 (@lxe)1623- * res.format: now includes chraset @1747 (@sorribas)1708+ * res.format: now includes charset @1747 (@sorribas)1709 * res.links: allow multiple calls @1746 (@sorribas)1710 1711 3.4.0 / 2013-09-071712 ==================270 unmodified lines1983 * Added hogan `--hjs` to express(1) [nullfirm]1984 * Added another example to content-negotiation1985 * Added `fresh` dep1986 * Changed: `res.send()` always checks freshness1902- * Fixed: expose connects mime module. Cloases #11651987+ * Fixed: expose connects mime module. Closes #11651988 1989 3.0.0beta2 / 2012-06-061990 ==================1991 73 unmodified lines2065 * Added `req.path`2066 * Added `req.ips`2067 * Added `req.fresh`2068 * Added `req.stale`1984- * Added comma-delmited / array support for `req.accepts()`2069+ * Added comma-delimited / array support for `req.accepts()`2070 * Added debug instrumentation2071 * Added `res.set(obj)`2072 * Added `res.set(field, value)`2073 * Added `res.get(field)`841 unmodified linesmodified:package.json+6 added-6 removed
28 unmodified lines2930313233333435363738373839404041424344454647484949505152533 unmodified lines5758596061616263646525 unmodified lines28 unmodified lines "dependencies": { "accepts": "~1.2.7", "content-disposition": "0.5.0", "content-type": "~1.0.1", "cookie": "0.1.2", "cookie": "0.1.3", "cookie-signature": "1.0.6", "debug": "~2.2.0", "depd": "~1.0.1", "escape-html": "1.0.1", "etag": "~1.6.0", "escape-html": "1.0.2", "etag": "~1.7.0", "finalhandler": "0.3.6", "fresh": "0.2.4", "fresh": "0.3.0", "merge-descriptors": "1.0.0", "methods": "~1.1.1", "on-finished": "~2.2.1", "parseurl": "~1.3.0", "path-to-regexp": "0.1.3", "proxy-addr": "~1.0.8", "qs": "2.4.2", "range-parser": "~1.0.2", "send": "0.12.3", "send": "0.13.0", "serve-static": "~1.9.3", "type-is": "~1.6.2", "vary": "~1.0.0", "utils-merge": "1.0.0"3 unmodified lines "ejs": "2.3.1", "istanbul": "0.3.9", "marked": "0.3.3", "mocha": "2.2.5", "should": "6.0.1", "should": "7.0.1", "supertest": "1.0.1", "body-parser": "~1.12.4", "connect-redis": "~2.3.0", "cookie-parser": "~1.3.4",25 unmodified lines