deps: etag@~1.8.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 · parent f2bbd10 · Browse files · 4 files·+20 added−17 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+20 added−17 removed
- tests:+16 added−16 removed
- other:+4 added−1 removed
Provenance
- Commit
9f4dbae- Tree
3d6d186- Author
Douglas Christopher Wilson <doug@somethingdoug.com>- Committer
Douglas Christopher Wilson <doug@somethingdoug.com>- Parent
f2bbd10
4 files changed+20 added−17 removed
modified:test/res.send.js+8 added-8 removed
131 unmodified lines132 });133 134 request(app)135 .get('/')136- .expect('ETag', 'W/"3e7-VYgCBglFKiDVAcpzPNt4Sg"')136+ .expect('ETag', 'W/"3e7-qPnkJ3CVdVhFJQvUBfF10TmVA7g"')137 .expect(200, done);138 })139 140 it('should not override Content-Type', function(done){59 unmodified lines200 });201 202 request(app)203 .get('/')204- .expect('ETag', 'W/"3e7-VYgCBglFKiDVAcpzPNt4Sg"')204+ .expect('ETag', 'W/"3e7-qPnkJ3CVdVhFJQvUBfF10TmVA7g"')205 .expect(200, done);206 })207 208 it('should not override Content-Type', function(done){145 unmodified lines354 app.enable('etag');355 356 request(app)357 .get('/')358- .expect('ETag', 'W/"c-ZUfd0NJ26qwjlKF4r8qb2g"')358+ .expect('ETag', 'W/"c-IgR/L5SF7CJQff4wxKGF/vfPuZ0"')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-ZUfd0NJ26qwjlKF4r8qb2g"')374+ .expect('ETag', 'W/"c-IgR/L5SF7CJQff4wxKGF/vfPuZ0"')375 .expect(200, done);376 })377 });378 7 unmodified lines386 app.enable('etag');387 388 request(app)389 .get('/')390- .expect('ETag', 'W/"0-1B2M2Y8AsgTpgAmY7PhCfg"')390+ .expect('ETag', 'W/"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"')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/"3e7-VYgCBglFKiDVAcpzPNt4Sg"')406+ .expect('ETag', 'W/"3e7-qPnkJ3CVdVhFJQvUBfF10TmVA7g"')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', '"d-Otu60XkfuuPskIiUxJY4cA"')488+ .expect('ETag', '"d-HwnTDHB9U/PRbFMN1z1wps51lqk"')489 .expect(200, done);490 })491 })492 8 unmodified lines501 });502 503 request(app)504 .get('/')505- .expect('ETag', 'W/"d-Otu60XkfuuPskIiUxJY4cA"')505+ .expect('ETag', 'W/"d-HwnTDHB9U/PRbFMN1z1wps51lqk"')506 .expect(200, done)507 })508 })509 41 unmodified linesmodified:test/utils.js+8 added-8 removed
3 unmodified lines45678891011121313141516171819192021222324242526272820 unmodified lines495051525353545556575858596061626364646566676869697071727323 unmodified lines3 unmodified lines
describe('utils.etag(body, encoding)', function(){ it('should support strings', function(){ utils.etag('express!') .should.eql('"8-zZdv4imtWD49AHEviejT6A"') .should.eql('"8-O2uVAFaQ1rZvlKLT14RnuvjPIdg"') })
it('should support utf8 strings', function(){ utils.etag('express❤', 'utf8') .should.eql('"a-fsFba4IxwQS6h6Umb+FNxw"') .should.eql('"a-JBiXf7GyzxwcrxY4hVXUwa7tmks"') })
it('should support buffer', function(){ var buf = new Buffer('express!') utils.etag(buf) .should.eql('"8-zZdv4imtWD49AHEviejT6A"'); .should.eql('"8-O2uVAFaQ1rZvlKLT14RnuvjPIdg"') })
it('should support empty string', function(){ utils.etag('') .should.eql('"0-1B2M2Y8AsgTpgAmY7PhCfg"'); .should.eql('"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"') })})
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-zZdv4imtWD49AHEviejT6A"') .should.eql('W/"8-O2uVAFaQ1rZvlKLT14RnuvjPIdg"') })
it('should support utf8 strings', function(){ utils.wetag('express❤', 'utf8') .should.eql('W/"a-fsFba4IxwQS6h6Umb+FNxw"') .should.eql('W/"a-JBiXf7GyzxwcrxY4hVXUwa7tmks"') })
it('should support buffer', function(){ var buf = new Buffer('express!') utils.wetag(buf) .should.eql('W/"8-zZdv4imtWD49AHEviejT6A"'); .should.eql('W/"8-O2uVAFaQ1rZvlKLT14RnuvjPIdg"') })
it('should support empty string', function(){ utils.wetag('') .should.eql('W/"0-1B2M2Y8AsgTpgAmY7PhCfg"'); .should.eql('W/"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"') })})
describe('utils.isAbsolute()', function(){23 unmodified linesmodified:History.md+3 added
6 unmodified lines7 - Deprecated `DEBUG_FD` environment variable set to `3` or higher8 - Fix error when running under React Native9 - Use same color for same namespace10 - deps: ms@0.7.211+ * deps: etag@~1.8.012+ - Use SHA1 instead of MD5 for ETag hashing13+ - Works with FIPS 140-2 OpenSSL configuration14 * deps: finalhandler@~1.0.015 - Fix exception when `err` cannot be converted to a string16 - Fully URL-encode the pathname in the 40417 - Only include the pathname in the 404 message3170 unmodified linesmodified:package.json+1 added-1 removed
35 unmodified lines3637383940404142434449 unmodified lines35 unmodified lines "debug": "2.6.1", "depd": "~1.1.0", "encodeurl": "~1.0.1", "escape-html": "~1.0.3", "etag": "~1.7.0", "etag": "~1.8.0", "finalhandler": "~1.0.0", "fresh": "0.3.0", "merge-descriptors": "1.0.1", "methods": "~1.1.2",49 unmodified lines