When a bucket url like bucket.s3.amazonaws.com with bucket name bucket
is present in params passed into request_params method, it
should not dupplicate the subdomain.
current: bucket.bucket.s3.amazonaws.com
fix: bucket.s3.amazonaws.com
Fix test failure due to Hash#slice not present for ruby 2.3
Previously attempting to use S3 server side encryption headers
(e.g. `x-amz-server-side-encryption`) would fail when attempting to use
`File#copy` because the method would pass these headers to the UploadPartCopy
(https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
API call. However, this would fail with an error:
```
<Code>InvalidArgument</Code>
<Message>x-amz-server-side-encryption header is not supported for this operation.</Message>
<ArgumentName>x-amz-server-side-encryption</ArgumentName>
<ArgumentValue>AES256</ArgumentValue>
```
This header can and should be used in the CompleteMultipartUpload
call. To support this, we filter out unknown headers in the
UploadPartCopy.
This avoids passing a parameter to an the HTTP request and also allows
callers to use `respond_to?(:concurrency)` to check whether `File`
supports this feature.
In the default region (us-east-1), put_bucket will return an existing
bucket, rather than throw a BucketAlreadyOwnedByYou error. Changed the
mock to reflect this behavior.