deps: etag@~1.8.0

This commit is contained in:
Douglas Christopher Wilson 2017-02-18 22:49:04 -05:00
parent f2bbd10ae7
commit 9f4dbae083
4 changed files with 20 additions and 17 deletions

View File

@ -8,6 +8,9 @@ unreleased
- Fix error when running under React Native
- Use same color for same namespace
- deps: ms@0.7.2
* deps: etag@~1.8.0
- Use SHA1 instead of MD5 for ETag hashing
- Works with FIPS 140-2 OpenSSL configuration
* deps: finalhandler@~1.0.0
- Fix exception when `err` cannot be converted to a string
- Fully URL-encode the pathname in the 404

View File

@ -37,7 +37,7 @@
"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",

View File

@ -133,7 +133,7 @@ describe('res', function(){
request(app)
.get('/')
.expect('ETag', 'W/"3e7-VYgCBglFKiDVAcpzPNt4Sg"')
.expect('ETag', 'W/"3e7-qPnkJ3CVdVhFJQvUBfF10TmVA7g"')
.expect(200, done);
})
@ -201,7 +201,7 @@ describe('res', function(){
request(app)
.get('/')
.expect('ETag', 'W/"3e7-VYgCBglFKiDVAcpzPNt4Sg"')
.expect('ETag', 'W/"3e7-qPnkJ3CVdVhFJQvUBfF10TmVA7g"')
.expect(200, done);
})
@ -355,7 +355,7 @@ describe('res', function(){
request(app)
.get('/')
.expect('ETag', 'W/"c-ZUfd0NJ26qwjlKF4r8qb2g"')
.expect('ETag', 'W/"c-IgR/L5SF7CJQff4wxKGF/vfPuZ0"')
.expect(200, done);
});
@ -371,7 +371,7 @@ describe('res', function(){
request(app)
[method]('/')
.expect('ETag', 'W/"c-ZUfd0NJ26qwjlKF4r8qb2g"')
.expect('ETag', 'W/"c-IgR/L5SF7CJQff4wxKGF/vfPuZ0"')
.expect(200, done);
})
});
@ -387,7 +387,7 @@ describe('res', function(){
request(app)
.get('/')
.expect('ETag', 'W/"0-1B2M2Y8AsgTpgAmY7PhCfg"')
.expect('ETag', 'W/"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"')
.expect(200, done);
})
@ -403,7 +403,7 @@ describe('res', function(){
request(app)
.get('/')
.expect('ETag', 'W/"3e7-VYgCBglFKiDVAcpzPNt4Sg"')
.expect('ETag', 'W/"3e7-qPnkJ3CVdVhFJQvUBfF10TmVA7g"')
.expect(200, done);
});
@ -485,7 +485,7 @@ describe('res', function(){
request(app)
.get('/')
.expect('ETag', '"d-Otu60XkfuuPskIiUxJY4cA"')
.expect('ETag', '"d-HwnTDHB9U/PRbFMN1z1wps51lqk"')
.expect(200, done);
})
})
@ -502,7 +502,7 @@ describe('res', function(){
request(app)
.get('/')
.expect('ETag', 'W/"d-Otu60XkfuuPskIiUxJY4cA"')
.expect('ETag', 'W/"d-HwnTDHB9U/PRbFMN1z1wps51lqk"')
.expect(200, done)
})
})

View File

@ -5,23 +5,23 @@ var utils = require('../lib/utils');
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"')
})
})
@ -50,23 +50,23 @@ describe('utils.setCharset(type, charset)', function () {
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"')
})
})