- Before this change a user would get an exception because the case statement
would attempt to do the else case which would get an `undefined method captures for nil class`
because the region is acutally a default region
Signed-off-by: Aakash Shah <ashah@pivotal.io>
The S3 docs claim that you should set the content-encoding to aws-chunked
for a streaming upload. This however results in S3 serving files with a blank
content-encoding header. After discussion with AWS support, it appears
that setting the content-encoding to aws-chunked isn't actually necessary
since S3 can infer this from other headers present in the request
Signature v4 requires that we insert a content-encoding header when doing
a streaming upload. If there is no pre-existing content encoding we should
set it to identity or some client may be confused by a blank content encoding
* The query hash expects that all keys are strings. If the query hash
has both string and symbol keys the `signature_v2` method raises an
exception
* The query hash is often the leftover keys that have not been
extracted from the initial request.
* The conversion of sym -> string is done elsewhere for other parameters
* Makes the request more robust in general.