fog/fog — pull request #1821 by ronen (2013-05-19 01:53:33+00:00)
Title: AWS S3 Invalid signature when using response-content-disposition=attachment with filename

Hi. To request an S3 object as an attachment with a specific name (different from the object name), you'd use

file.url(expiry, query: {'response-content-disposition' => 'attachment; filename=foo.txt'})

This worked in 1.10 but in 1.11.1 it gets a SignatureDoesNotMatch error.

The problem is that in 1.11.1, the signature() method is CGI encoding the query parameter values into the signature string, but AWS seems to expect the signature string to match the non-encoded values.

This pull request is a quick edit to remove the encoding from the signature string.