Before this change the v2 signer sorted the headers for signing as
joined key:value pairs. However this put these two headers in the
wrong order.
x-amz-copy-source-range:
x-amz-copy-source:
This changes sorts on the keys before joining the values producing the
correct sort order.
x-amz-copy-source:
x-amz-copy-source-range:
This commit also adds some missing query parameters for signing that I
spotted in the s3cmd source.
The V2 auth was failing with AWS and KS3 when used with
force_path_style = false (which is the default for both providers
now).
The V2 Auth needed the bucket prepended onto the string that gets
signed.
Note that endpoint must be set when using v2 auth with AWS. The code
warns about this.
This was worked out by observing the behaviour of s3cmd.