class Aws::Signers::S3

def canonicalized_resource(endpoint)

Other tags:
    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]
    bucket = bucket.value
    ssl = endpoint.scheme == 'https'
    if Plugins::S3BucketDns.dns_compatible?(bucket, ssl) && !@force_path_style
      parts << "/#{bucket}"
    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