5 # Sets the Content-Type header on responses which don't have one.
8 # use Rack::ContentType, "text/plain"
10 # When no content type argument is provided, "text/html" is assumed.
12 def initialize(app
, content_type
= "text/html")
13 @app, @content_type = app
, content_type
17 status
, headers
, body
= @app.call(env)
18 headers
= Utils
::HeaderHash.new(headers
)
19 headers
['Content-Type'] ||= @content_type
20 [status
, headers
.to_hash
, body
]