Browse files

Setting utf-8 in http header

  • Loading branch information...
1 parent e863673 commit 3ae126be0b10f573a4ce72147a0f214662bbc523 @Michieljoris committed Feb 22, 2014
Showing with 3 additions and 2 deletions.
  1. +2 −1 lib/defaultHandler.js
  2. +1 −1 package.json
View
3 lib/defaultHandler.js
@@ -50,6 +50,7 @@ function format(fmt, args) {
function createHeaders(file) {
//default headers ------------------------------------
var mimeType = file.mimeType || 'text/plain';
+ if (mimeType === 'text/html') mimeType = 'text/html; charset=UTF-8';
var headers = { 'Content-Type': mimeType
,Server: 'bb-server/' + options.version };
@@ -163,7 +164,7 @@ function isPrerender(req) {
//from https://developers.google.com/webmasters/ajax-crawling/docs/specification:
// Mapping from _escaped_fragment_ format to #! format
- // Any URL whose query parameters contain the special token
+ // AnyURL whose query parameters contain the special token
// _escaped_fragment_ as the last query parameter is considered an
// _escaped_fragment_ URL. Further, there must only be one
// _escaped_fragment_ in the URL, and it must be the last query
View
2 package.json
@@ -1,7 +1,7 @@
{
"name": "bb-server",
"description": "A bare bones http server",
- "version": "0.4.7",
+ "version": "0.4.8",
"homepage": "https://github.com/michieljoris/bb-server",
"keywords": [
"server"

0 comments on commit 3ae126b

Please sign in to comment.