add javascript mime type for webrick. fixes #98

This commit is contained in:
Tom Preston-Werner 2010-01-08 18:59:35 -08:00
parent add546f61e
commit 602a252364
2 changed files with 6 additions and 1 deletions

View File

@ -6,6 +6,7 @@
* Allow .mkd as markdown extension * Allow .mkd as markdown extension
* Use $stdout/err instead of constants (#99) * Use $stdout/err instead of constants (#99)
* Properly wrap code blocks (#91) * Properly wrap code blocks (#91)
* Add javascript mime type for webrick (#98)
== 0.5.5 == 0.5.5
* Bug Fixes * Bug Fixes

View File

@ -137,9 +137,13 @@ if options['server']
FileUtils.mkdir_p(destination) FileUtils.mkdir_p(destination)
mime_types = WEBrick::HTTPUtils::DefaultMimeTypes
mime_types.store 'js', 'application/javascript'
s = HTTPServer.new( s = HTTPServer.new(
:Port => options['server_port'], :Port => options['server_port'],
:DocumentRoot => destination :DocumentRoot => destination,
:MimeTypes => mime_types
) )
t = Thread.new { t = Thread.new {
s.start s.start