Skip to content

Commit

Permalink
version bump 0.4.0. remove explicit charset from content-type.
Browse files Browse the repository at this point in the history
  • Loading branch information
cainus committed Apr 24, 2014
1 parent ac8e74b commit 909f782
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -56,7 +56,7 @@ var makeErrorHandler = function(name, payload){

obj.error.detail = detail;

this.res.setHeader('Content-Type', 'application/json; charset=utf-8');
this.res.setHeader('Content-Type', 'application/json');
this.res.writeHead(payload.type);
var out = JSON.stringify(obj);
this.res.write(out);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -10,7 +10,7 @@
"http",
"hypermedia"
],
"version": "0.3.0",
"version": "0.4.0",
"bugs": {
"url": "https://github.com/cainus/json-status/issues"
},
Expand Down
6 changes: 3 additions & 3 deletions test/index.js
Expand Up @@ -41,7 +41,7 @@ describe("JsonStatus", function(){
responder.internalServerError(expected.detail);
fakeRes.status.should.equal(expected.type);
fakeRes.ended.should.equal(true);
fakeRes.headers['Content-Type'].should.equal("application/json; charset=utf-8");
fakeRes.headers['Content-Type'].should.equal("application/json");
var response = JSON.parse(fakeRes.body);
response.error.should.eql(expected);
});
Expand All @@ -62,7 +62,7 @@ describe("JsonStatus", function(){
responder.internalServerError(circular);
fakeRes.status.should.equal(expected.type);
fakeRes.ended.should.equal(true);
fakeRes.headers['Content-Type'].should.equal("application/json; charset=utf-8");
fakeRes.headers['Content-Type'].should.equal("application/json");
var response = JSON.parse(fakeRes.body);
response.error.should.eql(expected);
});
Expand Down Expand Up @@ -116,7 +116,7 @@ describe("JsonStatus", function(){
responder.badRequest(expected.detail);
fakeRes.status.should.equal(expected.type);
fakeRes.ended.should.equal(true);
fakeRes.headers['Content-Type'].should.equal("application/json; charset=utf-8");
fakeRes.headers['Content-Type'].should.equal("application/json");
var response = JSON.parse(fakeRes.body);
response.error.should.eql(expected);
});
Expand Down

0 comments on commit 909f782

Please sign in to comment.