Skip to content

Commit

Permalink
Remove charset=utf-8 default
Browse files Browse the repository at this point in the history
Fixes #220
  • Loading branch information
BigBlueHat authored and jfhbrook committed Apr 5, 2019
1 parent 8846881 commit 09b0118
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions test/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ test('setting port via cli - custom port', (t) => {
});

test('setting mimeTypes via cli - directly', (t) => {
t.plan(4);

t.plan(3);
const port = getRandomPort();
const root = path.resolve(__dirname, 'public/');
const mimeType = ['--mimeTypes', '{ "application/x-my-type": ["opml"] }'];
Expand All @@ -98,8 +97,7 @@ test('setting mimeTypes via cli - directly', (t) => {
ecstatic.stdout.on('data', () => {
t.pass('ecstatic should be started');
checkServerIsRunning(`${defaultUrl}:${port}/custom_mime_type.opml`, t, (err, res) => {
t.error(err);
t.equal(res.headers['content-type'], 'application/x-my-type; charset=utf8');
t.equal(res.headers['content-type'], 'application/x-my-type');
});
});
});
2 changes: 1 addition & 1 deletion test/content-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test('default default contentType', (t) => {
request.get(`http://localhost:${port}/f_f`, (err, res) => {
t.ifError(err);
t.equal(res.statusCode, 200);
t.equal(res.headers['content-type'], 'text/plain; charset=utf8');
t.equal(res.headers['content-type'], 'text/plain');
server.close(() => { t.end(); });
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/custom-content-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test('custom contentType', (t) => {
request.get(`http://localhost:${port}/custom_mime_type.opml`, (err, res) => {
t.ifError(err);
t.equal(res.statusCode, 200, 'custom_mime_type.opml should be found');
t.equal(res.headers['content-type'], 'application/jon; charset=utf8');
t.equal(res.headers['content-type'], 'application/jon');
server.close(() => { t.end(); });
});
});
Expand Down

0 comments on commit 09b0118

Please sign in to comment.