Skip to content
This repository has been archived by the owner on Apr 19, 2019. It is now read-only.

Commit

Permalink
Make an attempt at setting a proper mime-type when showing a file.
Browse files Browse the repository at this point in the history
Prevents things like having the browser show raw binary data when you have a PDF in your repo.
  • Loading branch information
MrJoy authored and technoweenie committed Aug 31, 2010
1 parent 1f8a675 commit 6de9ddf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/gollum/frontend/app.rb
Expand Up @@ -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
Expand Down

0 comments on commit 6de9ddf

Please sign in to comment.