mirror of
https://github.com/zebrajr/express.git
synced 2026-01-15 12:15:27 +00:00
move setHeader charset patch to .set
note that application/json no longer adds charset=utf-8. could be a regression. closes #1952 See also: https://github.com/broofa/node-mime/issues/86
This commit is contained in:
@@ -114,7 +114,7 @@ describe('res', function(){
|
||||
request(app)
|
||||
.get('/')
|
||||
.end(function(err, res){
|
||||
res.headers.should.have.property('content-type', 'application/json; charset=utf-8');
|
||||
res.headers.should.have.property('content-type', 'application/json');
|
||||
res.text.should.equal('null');
|
||||
done();
|
||||
})
|
||||
@@ -132,7 +132,7 @@ describe('res', function(){
|
||||
request(app)
|
||||
.get('/')
|
||||
.end(function(err, res){
|
||||
res.headers.should.have.property('content-type', 'application/json; charset=utf-8');
|
||||
res.headers.should.have.property('content-type', 'application/json');
|
||||
res.text.should.equal('["foo","bar","baz"]');
|
||||
done();
|
||||
})
|
||||
@@ -150,7 +150,7 @@ describe('res', function(){
|
||||
request(app)
|
||||
.get('/')
|
||||
.end(function(err, res){
|
||||
res.headers.should.have.property('content-type', 'application/json; charset=utf-8');
|
||||
res.headers.should.have.property('content-type', 'application/json');
|
||||
res.text.should.equal('{"name":"tobi"}');
|
||||
done();
|
||||
})
|
||||
@@ -217,7 +217,7 @@ describe('res', function(){
|
||||
.get('/')
|
||||
.end(function(err, res){
|
||||
res.statusCode.should.equal(201);
|
||||
res.headers.should.have.property('content-type', 'application/json; charset=utf-8');
|
||||
res.headers.should.have.property('content-type', 'application/json');
|
||||
res.text.should.equal('{"id":1}');
|
||||
done();
|
||||
})
|
||||
@@ -236,7 +236,7 @@ describe('res', function(){
|
||||
.get('/')
|
||||
.end(function(err, res){
|
||||
res.statusCode.should.equal(201);
|
||||
res.headers.should.have.property('content-type', 'application/json; charset=utf-8');
|
||||
res.headers.should.have.property('content-type', 'application/json');
|
||||
res.text.should.equal('{"id":1}');
|
||||
done();
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user