1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

Revert "refactored content_type to use to_params"

This reverts commit f9e6b88504.
This commit is contained in:
Blake Mizerany 2008-04-15 16:56:08 -07:00
parent f9e6b88504
commit 540aa5faed

View file

@ -454,7 +454,7 @@ module Sinatra
type = Rack::File::MIME_TYPES[type.to_s] if type.kind_of?(Symbol)
fail "Invalid or undefined media_type: #{type}" if type.nil?
if params.any?
params = params.to_params
params = params.collect { |kv| "%s=%s" % kv }.join(', ')
type = [ type, params ].join(";")
end
response.header['Content-Type'] = type