Set content-type to text/html with utf-8 charset.

Fixes #2289
This commit is contained in:
Parker Moore 2014-05-03 18:51:55 -04:00
parent adfd9091f8
commit 3af22f12bf
1 changed files with 1 additions and 2 deletions

View File

@ -44,8 +44,6 @@ module Jekyll
Jekyll.logger.info "Server address:", server_address(s, options) Jekyll.logger.info "Server address:", server_address(s, options)
p s
if options['detach'] # detach the server if options['detach'] # detach the server
pid = Process.fork { s.start } pid = Process.fork { s.start }
Process.detach(pid) Process.detach(pid)
@ -66,6 +64,7 @@ module Jekyll
if File.exist?(File.join(destination, '404.html')) if File.exist?(File.join(destination, '404.html'))
WEBrick::HTTPResponse.class_eval do WEBrick::HTTPResponse.class_eval do
def create_error_page def create_error_page
@header['content-type'] = "text/html; charset=UTF-8"
@body = IO.read(File.join(@config[:DocumentRoot], '404.html')) @body = IO.read(File.join(@config[:DocumentRoot], '404.html'))
end end
end end