class AWS::S3::Request

def canonicalized_resource


"?logging", or "?torrent"];
[ sub-resource, if present. e.g. "?acl", "?location",
+
[ "/" + Bucket ] +
CanonicalizedResource =

From the S3 developer guide
def canonicalized_resource
  parts = []
  # virtual hosted-style requests require the hostname to appear
  # in the canonicalized resource prefixed by a forward slash.
  if 
    Client.dns_compatible_bucket_name?(bucket) and
    !Client.path_style_bucket_name?(bucket)
  then
    parts << "/#{bucket}"
  end
  # all requests require the portion of the un-decoded uri up to
  # but not including the query string
  parts << path
  # lastly any sub resource querystring params need to be appened
  # in lexigraphical ordered joined by '&' and prefixed by '?'
  params = (sub_resource_params + query_parameters_for_signature)
  unless params.empty?
    parts << '?'
    parts << params.sort.collect{|p| p.to_s }.join('&')
  end
  parts.join
end