From 6de9ddfd3f79a9cb320aab3c43b8e0a912107b2e Mon Sep 17 00:00:00 2001 From: Jon Frisby Date: Fri, 20 Aug 2010 18:55:05 +0800 Subject: [PATCH] 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. --- lib/gollum/frontend/app.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/gollum/frontend/app.rb b/lib/gollum/frontend/app.rb index 0d6be29b6..bdc9f1e48 100644 --- a/lib/gollum/frontend/app.rb +++ b/lib/gollum/frontend/app.rb @@ -141,6 +141,7 @@ def show_page_or_file(name) @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