I shouldn't code late at night
This commit is contained in:
parent
8f861fef06
commit
8d6739b15b
1 changed files with 1 additions and 0 deletions
|
@ -519,6 +519,7 @@ module Middleman
|
||||||
# @param [Hash] params
|
# @param [Hash] params
|
||||||
# @return [void]
|
# @return [void]
|
||||||
def content_type(res, type, params={})
|
def content_type(res, type, params={})
|
||||||
|
return res['Content-Type'] unless type
|
||||||
default = params.delete :default
|
default = params.delete :default
|
||||||
mime_type = mime_type(type) || default
|
mime_type = mime_type(type) || default
|
||||||
throw "Unknown media type: %p" % type if mime_type.nil?
|
throw "Unknown media type: %p" % type if mime_type.nil?
|
||||||
|
|
Loading…
Add table
Reference in a new issue