return octet stream for unmatched extensions, instead of nil
This commit is contained in:
parent
a630b97201
commit
91e00e5289
|
@ -99,7 +99,9 @@ module Middleman::Base
|
||||||
|
|
||||||
# Return static files
|
# Return static files
|
||||||
if !::Tilt.mappings.has_key?(template_engine.to_s)
|
if !::Tilt.mappings.has_key?(template_engine.to_s)
|
||||||
content_type mime_type(File.extname(request_path)), :charset => 'utf-8'
|
matched_mime = mime_type(File.extname(request_path))
|
||||||
|
matched_mime = "application/octet-stream" if matched_mime.nil?
|
||||||
|
content_type matched_mime, :charset => 'utf-8'
|
||||||
status 200
|
status 200
|
||||||
send_file File.join(settings.views, request_path)
|
send_file File.join(settings.views, request_path)
|
||||||
false
|
false
|
||||||
|
|
Loading…
Reference in a new issue