class Aws::CloudFront::UrlSigner
def resource(scheme, url)
def resource(scheme, url) case scheme when 'http', 'http*', 'https' then url when 'rtmp' url_info = URI.parse(url) path = url_info.path path[0] = '' resource_content = "#{File.dirname(path)}/#{File.basename(path)}".gsub(' ', '/') if url_info.query "#{resource_content}?#{uri.query}" else resource_content end else msg = "Invaild URI scheme:#{scheme}.Scheme must be one of: http, https or rtmp." raise ArgumentError, msg end end