store content type in env["wd.format"] instead of params[:format]
store media type in env["wd.media_type"]