class Aws::Signers::S3
def canonicalized_resource(endpoint)
- Api: - private
def canonicalized_resource(endpoint) parts = [] # virtual hosted-style requests require the hostname to appear # in the canonicalized resource prefixed by a forward slash. if bucket = params[:bucket] ssl = endpoint.scheme == 'https' if Plugins::S3BucketDns.dns_compatible?(bucket.value, ssl) && !@force_path_style then parts << "/#{bucket.value}" end end # append the path name (no querystring) parts << endpoint.path # lastly any sub resource querystring params need to be appened # in lexigraphical ordered joined by '&' and prefixed by '?' params = signed_querystring_params(endpoint) unless params.empty? parts << '?' parts << params.sort.collect{|p| p.to_s }.join('&') end parts.join end