Logics have been centralised:
* region to hostname
* url generation
* signature
* chaning scheme also changes the port
During the process a couple of inconsistencies have also
been fixed.
Known limitations:
When using the @endpoint with a custom port you need to specify the port
when using get_object_http_url or get_object_https_url.
When using bucket names that contain dots outside of us-east-1 make sure to
access it with the same region in your AWS::Storage.
CGI.escape creates URL-safe encodings, but we need XML-safe encodings.
If the key name has a "/" in it (as for a directory structure) it gets
replaced with a URL-safe "%2F" which S3 treats as a literal part of the
key name. We only need to escape the parts of the key that could result
in malformed XML.
Added the VersionId support in the delete_multiple_objects method.
Assume that all object versions are specified in the versionId hash.
The hash maps an object name to an array of versions. If a multiple
versions are to be deleted, the caller must insert the object
multiple times into the object_names array and insert all the versions
into the array associated with that object_name.