Make an attempt at setting a proper mime-type when showing a file.

Prevents things like having the browser show raw binary data when you have a PDF in your repo.
This commit is contained in:
Jon Frisby
2010-08-20 18:55:05 +08:00
committed by rick
parent 1f8a67598a
commit 6de9ddfd3f
+1
View File
@@ -141,6 +141,7 @@ module Precious
@content = page.formatted_data
mustache :page
elsif file = wiki.file(name)
content_type MIME::Types.type_for(name).to_s
file.raw_data
else
@name = name