osx - AWS iOS SDK S3 "SignatureDoesNotMatch" Error on certain localizations -


i using ios aws sdk upload file amazon s3 on mac app.

it works fine on languages (english, french, german, etc), fails when test localizations japanese, chinese, , others. here error when using 1 of these localizations:

    failed error: error domain=com.amazonaws.awsgeneralerrordomain code=3 "未能完成该操作。(com.amazonaws.awsgeneralerrordomain 错误 3。)" userinfo=0x6000001bcfc0 {signatureprovided=534652dd131bdab6bec073d4cf62a21abf877763b1012818083c3b72b4229383, canonicalrequest=put  content-encoding:aws-chunked content-type:binary/octet-stream host:s3.amazonaws.com transfer-encoding:chunked user-agent:aws-sdk-ios/2.0.8 osx/ x-amz-acl:public-read-write x-amz-content-sha256:streaming-aws4-hmac-sha256-payload x-amz-date:20150708t042622z x-amz-decoded-content-length:16440 x-amz-server-side-encryption:aes256  content-encoding;content-type;host;transfer-encoding;user-agent;x-amz-acl;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length;x-amz-server-side-encryption streaming-aws4-hmac-sha256-payload, stringtosign=aws4-hmac-sha256 20150708t042622z 20150708/us-east-1/s3/aws4_request c3152a63369748f3f0f0cc67de584a1c2a87637270e750714779f4d54fb38b32, code=signaturedoesnotmatch, requestid=d5166a20df835dae, hostid=fpppmvonpuypnnekgn4qph0jsznee3qxlxmtkqi3tsrzcgdngyjcarxc5t9xkcuy, stringtosignbytes=41 57 53 34 2d 48 4d 41 43 2d 53 48 41 32 35 36 0a 32 30 31 35 30 37 30 38 54 30 34 32 36 32 32 5a 0a 32 30 31 35 30 37 30 38 2f 75 73 2d 65 61 73 74 2d 31 2f 73 33 2f 61 77 73 34 5f 72 65 71 75 65 73 74 0a 63 33 31 35 32 61 36 33 33 36 39 37 34 38 66 33 66 30 66 30 63 63 36 37 64 65 35 38 34 61 31 63 32 61 38 37 36 33 37 32 37 30 65 37 35 30 37 31 34 37 37 39 66 34 64 35 34 66 62 33 38 62 33 32, awsaccesskeyid=<removedforstackoverflow>, canonicalrequestbytes=50 55 54 0a 2f 69 6f 73 6d 61 63 74 68 65 66 69 6c 65 63 6f 6e 76 65 72 74 65 72 31 30 2f 6d 68 65 72 72 61 62 68 7a 7a 2e 70 64 66 0a 0a 63 6f 6e 74 65 6e 74 2d 65 6e 63 6f 64 69 6e 67 3a 61 77 73 2d 63 68 75 6e 6b 65 64 0a 63 6f 6e 74 65 6e 74 2d 74 79 70 65 3a 62 69 6e 61 72 79 2f 6f 63 74 65 74 2d 73 74 72 65 61 6d 0a 68 6f 73 74 3a 73 33 2e 61 6d 61 7a 6f 6e 61 77 73 2e 63 6f 6d 0a 74 72 61 6e 73 66 65 72 2d 65 6e 63 6f 64 69 6e 67 3a 43 68 75 6e 6b 65 64 0a 75 73 65 72 2d 61 67 65 6e 74 3a 61 77 73 2d 73 64 6b 2d 69 4f 53 2f 32 2e 30 2e 38 20 4f 53 58 2f 0a 78 2d 61 6d 7a 2d 61 63 6c 3a 70 75 62 6c 69 63 2d 72 65 61 64 2d 77 72 69 74 65 0a 78 2d 61 6d 7a 2d 63 6f 6e 74 65 6e 74 2d 73 68 61 32 35 36 3a 53 54 52 45 41 4d 49 4e 47 2d 41 57 53 34 2d 48 4d 41 43 2d 53 48 41 32 35 36 2d 50 41 59 4c 4f 41 44 0a 78 2d 61 6d 7a 2d 64 61 74 65 3a 32 30 31 35 30 37 30 38 54 30 34 32 36 32 32 5a 0a 78 2d 61 6d 7a 2d 64 65 63 6f 64 65 64 2d 63 6f 6e 74 65 6e 74 2d 6c 65 6e 67 74 68 3a 31 36 34 34 30 0a 78 2d 61 6d 7a 2d 73 65 72 76 65 72 2d 73 69 64 65 2d 65 6e 63 72 79 70 74 69 6f 6e 3a 41 45 53 32 35 36 0a 0a 63 6f 6e 74 65 6e 74 2d 65 6e 63 6f 64 69 6e 67 3b 63 6f 6e 74 65 6e 74 2d 74 79 70 65 3b 68 6f 73 74 3b 74 72 61 6e 73 66 65 72 2d 65 6e 63 6f 64 69 6e 67 3b 75 73 65 72 2d 61 67 65 6e 74 3b 78 2d 61 6d 7a 2d 61 63 6c 3b 78 2d 61 6d 7a 2d 63 6f 6e 74 65 6e 74 2d 73 68 61 32 35 36 3b 78 2d 61 6d 7a 2d 64 61 74 65 3b 78 2d 61 6d 7a 2d 64 65 63 6f 64 65 64 2d 63 6f 6e 74 65 6e 74 2d 6c 65 6e 67 74 68 3b 78 2d 61 6d 7a 2d 73 65 72 76 65 72 2d 73 69 64 65 2d 65 6e 63 72 79 70 74 69 6f 6e 0a 53 54 52 45 41 4d 49 4e 47 2d 41 57 53 34 2d 48 4d 41 43 2d 53 48 41 32 35 36 2d 50 41 59 4c 4f 41 44, message=the request signature calculated not match signature provided. check key , signing method.} 

my code works fine english , european languages i've tried, here is:

awsstaticcredentialsprovider *credentialsprovider = [awsstaticcredentialsprovider credentialswithaccesskey:access_key_id secretkey:secret_key]; configuration = [awsserviceconfiguration configurationwithregion:awsregionuseast1 credentialsprovider:credentialsprovider]; [awsservicemanager defaultservicemanager].defaultserviceconfiguration = configuration;   _transfermanager = [awss3transfermanager defaults3transfermanager];  awss3transfermanageruploadrequest *uploadrequest = [awss3transfermanageruploadrequest new]; uploadrequest.bucket = bucket_name; uploadrequest.key = file.amazonkey; uploadrequest.body = [nsurl urlwithstring:file.ogfilepath]; uploadrequest.acl = uploadrequest.acl=awss3bucketcannedaclpublicreadwrite; uploadrequest.serversideencryption = awss3serversideencryptionaes256;  [[_transfermanager upload:uploadrequest] continuewithexecutor:[bfexecutor mainthreadexecutor]                                                    withblock:^id(bftask *task) { 


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -