Comparing version 2.1.6 to 2.1.7
@@ -36,3 +36,3 @@ module.exports = handleDefault | ||
' (' + ansicolors.blue('generated') + ')' | ||
resp.setHeader('content-type', 'text/html') | ||
resp.setHeader('content-type', 'text/html; charset=utf-8') | ||
resp.end(data.replace( | ||
@@ -39,0 +39,0 @@ /\{\{entry\}\}/g |
{ | ||
"name": "beefy", | ||
"version": "2.1.6", | ||
"version": "2.1.7", | ||
"description": "local development server that aims to make using browserify fast and fun", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -115,2 +115,27 @@ var defaultIndex = require('../../lib/handlers/default-index.js') | ||
test('responds with a utf-8 charset', function(assert) { | ||
var handler = defaultIndex({ | ||
generatedIndex: __filename | ||
}, {error: logError}, _404) | ||
, err = new Error | ||
, logged = null | ||
runServerAndRequest(handler, {accept: 'html'}, function(res, body) { | ||
fs.readFile( | ||
__filename | ||
, 'utf8' | ||
, onread | ||
) | ||
function onread(err, str) { | ||
assert.equal(res.headers['content-type'], 'text/html; charset=utf-8') | ||
assert.end() | ||
} | ||
}) | ||
function logError(what) { | ||
logged = what | ||
} | ||
}) | ||
test('accepts http requests without accept headers', function(assert) { | ||
@@ -117,0 +142,0 @@ var handler = defaultIndex({}, {error: logError}, _404) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
849625
2561