From 3af22f12bf177de440e7aba40751e7878a8d5a1c Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 3 May 2014 18:51:55 -0400 Subject: [PATCH] Set content-type to text/html with utf-8 charset. Fixes #2289 --- lib/jekyll/commands/serve.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/jekyll/commands/serve.rb b/lib/jekyll/commands/serve.rb index 31652490..0f6c6d37 100644 --- a/lib/jekyll/commands/serve.rb +++ b/lib/jekyll/commands/serve.rb @@ -44,8 +44,6 @@ module Jekyll Jekyll.logger.info "Server address:", server_address(s, options) - p s - if options['detach'] # detach the server pid = Process.fork { s.start } Process.detach(pid) @@ -66,6 +64,7 @@ module Jekyll if File.exist?(File.join(destination, '404.html')) WEBrick::HTTPResponse.class_eval do def create_error_page + @header['content-type'] = "text/html; charset=UTF-8" @body = IO.read(File.join(@config[:DocumentRoot], '404.html')) end end