deps: etag@~1.7.0
Before adoption: this commit came in with the history the project adopted, so no landing records it.
fixes #2667
authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 0fbf207 · Browse files · 4 files·+26 added−18 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+26 added−18 removed
- tests:+17 added−17 removed
- other:+9 added−1 removed
Provenance
- Commit
c8d61b6- Tree
553c073- Author
Douglas Christopher Wilson <doug@somethingdoug.com>- Committer
Douglas Christopher Wilson <doug@somethingdoug.com>- Parent
0fbf207
4 files changed+26 added−18 removed
modified:test/res.send.js+9 added-9 removed
119 unmodified lines120 });121 122 request(app)123 .get('/')124- .expect('ETag', 'W/"fz/jGo0ONwzb+aKy/rWipg=="')124+ .expect('ETag', 'W/"7ff-fFD7Se+Vsq6deAl063thow"')125 .expect(200, done);126 })127 128 it('should not override Content-Type', function(done){63 unmodified lines192 });193 194 request(app)195 .get('/')196- .expect('ETag', 'W/"fz/jGo0ONwzb+aKy/rWipg=="')196+ .expect('ETag', 'W/"7ff-fFD7Se+Vsq6deAl063thow"')197 .expect(200, done);198 })199 200 it('should not override Content-Type', function(done){107 unmodified lines308 });309 310 request(app)311 .get('/')312- .set('If-None-Match', 'W/"fz/jGo0ONwzb+aKy/rWipg=="')312+ .set('If-None-Match', 'W/"7ff-fFD7Se+Vsq6deAl063thow"')313 .expect(304, done);314 })315 316 it('should not perform freshness check unless 2xx or 304', function(done){37 unmodified lines354 app.enable('etag');355 356 request(app)357 .get('/')358- .expect('ETag', 'W/"c-5aee35d8"')358+ .expect('ETag', 'W/"c-ZUfd0NJ26qwjlKF4r8qb2g"')359 .expect(200, done);360 });361 362 methods.forEach(function (method) {7 unmodified lines370 });371 372 request(app)373 [method]('/')374- .expect('ETag', 'W/"c-5aee35d8"')374+ .expect('ETag', 'W/"c-ZUfd0NJ26qwjlKF4r8qb2g"')375 .expect(200, done);376 })377 });378 7 unmodified lines386 app.enable('etag');387 388 request(app)389 .get('/')390- .expect('ETag', 'W/"0-0"')390+ .expect('ETag', 'W/"0-1B2M2Y8AsgTpgAmY7PhCfg"')391 .expect(200, done);392 })393 394 it('should send ETag for long response', function (done) {7 unmodified lines402 app.enable('etag');403 404 request(app)405 .get('/')406- .expect('ETag', 'W/"fz/jGo0ONwzb+aKy/rWipg=="')406+ .expect('ETag', 'W/"7ff-fFD7Se+Vsq6deAl063thow"')407 .expect(200, done);408 });409 410 it('should not override ETag when manually set', function (done) {73 unmodified lines484 });485 486 request(app)487 .get('/')488- .expect('ETag', '"Otu60XkfuuPskIiUxJY4cA=="')488+ .expect('ETag', '"d-Otu60XkfuuPskIiUxJY4cA"')489 .expect(200, done);490 })491 })492 8 unmodified lines501 });502 503 request(app)504 .get('/')505- .expect('ETag', 'W/"d-58988d13"')505+ .expect('ETag', 'W/"d-Otu60XkfuuPskIiUxJY4cA"')506 .expect(200, done)507 })508 })509 45 unmodified linesmodified:test/utils.js+8 added-8 removed
3 unmodified lines4 5 describe('utils.etag(body, encoding)', function(){6 it('should support strings', function(){7 utils.etag('express!')8- .should.eql('"zZdv4imtWD49AHEviejT6A=="')8+ .should.eql('"8-zZdv4imtWD49AHEviejT6A"')9 })10 11 it('should support utf8 strings', function(){12 utils.etag('express❤', 'utf8')13- .should.eql('"fsFba4IxwQS6h6Umb+FNxw=="')13+ .should.eql('"a-fsFba4IxwQS6h6Umb+FNxw"')14 })15 16 it('should support buffer', function(){17 var buf = new Buffer('express!')18 utils.etag(buf)19- .should.eql('"zZdv4imtWD49AHEviejT6A=="');19+ .should.eql('"8-zZdv4imtWD49AHEviejT6A"');20 })21 22 it('should support empty string', function(){23 utils.etag('')24- .should.eql('"1B2M2Y8AsgTpgAmY7PhCfg=="');24+ .should.eql('"0-1B2M2Y8AsgTpgAmY7PhCfg"');25 })26 })27 28 describe('utils.wetag(body, encoding)', function(){29 it('should support strings', function(){30 utils.wetag('express!')31- .should.eql('W/"8-b8aabac7"')31+ .should.eql('W/"8-zZdv4imtWD49AHEviejT6A"')32 })33 34 it('should support utf8 strings', function(){35 utils.wetag('express❤', 'utf8')36- .should.eql('W/"a-686b0af1"')36+ .should.eql('W/"a-fsFba4IxwQS6h6Umb+FNxw"')37 })38 39 it('should support buffer', function(){40 var buf = new Buffer('express!')41 utils.wetag(buf)42- .should.eql('W/"8-b8aabac7"');42+ .should.eql('W/"8-zZdv4imtWD49AHEviejT6A"');43 })44 45 it('should support empty string', function(){46 utils.wetag('')47- .should.eql('W/"0-0"');47+ .should.eql('W/"0-1B2M2Y8AsgTpgAmY7PhCfg"');48 })49 })50 51 describe('utils.isAbsolute()', function(){199 unmodified linesmodified:History.md+8 added
24 unmodified lines25 * deps: cookie@0.1.326 - perf: deduce the scope of try-catch deopt27 - perf: remove argument reassignments28 * deps: escape-html@1.0.229+ * deps: etag@~1.7.030+ - Always include entity length in ETags for hash length extensions31+ - Generate non-Stats ETags using MD5 only (no longer CRC32)32+ - Improve stat performance by removing hashing33+ - Improve support for JXcore34+ - Remove base64 padding in ETags to shorten35+ - Support "fake" stats objects in environments without fs36+ - Use MD5 instead of MD4 in weak ETags over 1KB37 * deps: mkdirp@0.5.138 - Work in global strict mode39 40 3.20.3 / 2015-05-172054 unmodified linesmodified:package.json+1 added-1 removed
34 unmodified lines3536373839394041424337 unmodified lines34 unmodified lines "cookie-signature": "1.0.6", "debug": "~2.2.0", "depd": "~1.0.1", "escape-html": "1.0.2", "etag": "~1.5.1", "etag": "~1.7.0", "fresh": "0.2.4", "merge-descriptors": "1.0.0", "methods": "~1.1.1", "mkdirp": "0.5.1",37 unmodified lines