Looking for some help in tracking down an issue with downloading files via s2Member from AmazonS3 when the file/object name contains a + or ++
If I make the file public I am able to access it via the Amazon file download URL
https://s3.amazonaws.com/unixpackages/sparc/10/gtk%2B-2.12.0-sol10-sparc-local.gz
without any issues.
If I try accessing the file via s2member with
http://domain.com/?s2member_file_download=/sparc/8/gtk%2B-2.12.0-sol8-sparc-local.gz
it errors with:
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>sparc/8/gtk -2.12.0-sol8-sparc-local.gz</Key>
<RequestId>B4304A631D838725</RequestId>
<HostId>XXXXXXXXXX</HostId>
</Error>
if I use the + rather than %2B ie
http://domain.com/?s2member_file_download=/sparc/8/gtk+-2.12.0-sol8-sparc-local.gz
I get:
<Error>
<Code>SignatureDoesNotMatch</Code>
<Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>
<StringToSignBytes>47 45 54 0a
<snip --
||
snip >
6e 73 65 2d 65 78 70 69 72 65 73 3d 46 72 69 2c 20 32 33 20 44 65 63 20 32 30 31 31 20 30 32 3a 34 31 3a 30 35 20 47 4d 54</StringToSignBytes>
<RequestId>8A90E89632DA6ADB</RequestId>
<HostId>XXXXXXXXX</HostId>
<SignatureProvided>XXXXXXXXXSignatureProvided>
<StringToSign>GET 1325212895
/unixpackages/sparc/8/gtk-2.12.0-sol8-sparc-local.gz?response-cache-control=no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0&response-content-disposition=attachment; filename="gtk -2.12.0-sol8-sparc-local.gz"&response-content-type=application/x-gzip&response-expires=Fri, 23 Dec 2011 02:41:05 GMT</StringToSign>
<AWSAccessKeyId>XXXXXXXXX</AWSAccessKeyId>
</Error>
I am also using . Donovan Schonknecht's S3php class to bring back the file attributes and that also fails on these files, I'm trying to figure out if its a generic AmazonS3 issue of it it's a problem with a lack of URL encoding by the plugin/class. I am on a version of PHP that supports encoding.
Any help much appreciated, as its not easy for me to have to remove all the +'s from the file names.
Colin