{"action":"created","issue":{"url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/issues/329","labels_url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/issues/329/labels{/name}","comments_url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/issues/329/comments","events_url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/issues/329/events","html_url":"https://github.com/s3fs-fuse/s3fs-fuse/pull/329","id":125849880,"number":329,"title":"Correct multiple issues with GET and v4 signing","user":{"login":"andrewgaul","id":848247,"avatar_url":"https://avatars.githubusercontent.com/u/848247?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewgaul","html_url":"https://github.com/andrewgaul","followers_url":"https://api.github.com/users/andrewgaul/followers","following_url":"https://api.github.com/users/andrewgaul/following{/other_user}","gists_url":"https://api.github.com/users/andrewgaul/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewgaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewgaul/subscriptions","organizations_url":"https://api.github.com/users/andrewgaul/orgs","repos_url":"https://api.github.com/users/andrewgaul/repos","events_url":"https://api.github.com/users/andrewgaul/events{/privacy}","received_events_url":"https://api.github.com/users/andrewgaul/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-10T22:30:07Z","updated_at":"2016-01-16T07:15:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/pulls/329","html_url":"https://github.com/s3fs-fuse/s3fs-fuse/pull/329","diff_url":"https://github.com/s3fs-fuse/s3fs-fuse/pull/329.diff","patch_url":"https://github.com/s3fs-fuse/s3fs-fuse/pull/329.patch"},"body":"* provide correct path\r\n* sign query string\r\n* URL encode query string"},"comment":{"url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/issues/comments/172167957","html_url":"https://github.com/s3fs-fuse/s3fs-fuse/pull/329#issuecomment-172167957","issue_url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/issues/329","id":172167957,"user":{"login":"ggtakec","id":3221882,"avatar_url":"https://avatars.githubusercontent.com/u/3221882?v=3","gravatar_id":"","url":"https://api.github.com/users/ggtakec","html_url":"https://github.com/ggtakec","followers_url":"https://api.github.com/users/ggtakec/followers","following_url":"https://api.github.com/users/ggtakec/following{/other_user}","gists_url":"https://api.github.com/users/ggtakec/gists{/gist_id}","starred_url":"https://api.github.com/users/ggtakec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggtakec/subscriptions","organizations_url":"https://api.github.com/users/ggtakec/orgs","repos_url":"https://api.github.com/users/ggtakec/repos","events_url":"https://api.github.com/users/ggtakec/events{/privacy}","received_events_url":"https://api.github.com/users/ggtakec/received_events","type":"User","site_admin":false},"created_at":"2016-01-16T07:15:39Z","updated_at":"2016-01-16T07:15:39Z","body":"When starting s3fs(no url option), some error(403) about signature is put.\r\n\r\nI tested following command:\r\n```\r\ns3fs <mybucket> /mnt/s3 -o allow_other,dbglevel=dbg -f\r\n```\r\n\r\nand debug message is following:\r\n```\r\n[CRT] s3fs.cpp:set_s3fs_log_level(251): change debug level from [CRT] to [DBG]\r\n[INF]     s3fs.cpp:set_moutpoint_attribute(4111): PROC(uid=0, gid=0) - MountPoint(uid=0, gid=0, mode=40700)\r\n[CRT] s3fs.cpp:s3fs_init(3314): init v1.79(commit:87d04ac) with OpenSSL\r\n[INF] s3fs.cpp:s3fs_check_service(3673): check services.\r\n[INF]       curl.cpp:CheckBucket(2651): check a bucket.\r\n[INF]       curl.cpp:prepare_url(4145): URL is http://s3.amazonaws.com/<my bucket>/\r\n[INF]       curl.cpp:prepare_url(4177): URL changed is http://<my bucket>.s3.amazonaws.com/\r\n[INF]       curl.cpp:insertV4Headers(2073): computing signature [GET] [/] [] []\r\n[INF]       curl.cpp:url_to_host(99): url is http://s3.amazonaws.com\r\n[DBG] curl.cpp:RequestPerform(1726): connecting to URL http://<my bucket>.s3.amazonaws.com/\r\n[INF]       curl.cpp:RequestPerform(1755): HTTP response code 400 was returned, returing EIO.\r\n[DBG] curl.cpp:RequestPerform(1756): Body Text: <?xml version=\"1.0\" encoding=\"UTF-8\"?><Error><Code>AuthorizationHeaderMalformed</Code><Message>The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'ap-northeast-1'</Message><Region>ap-northeast-1</Region><RequestId>0A2702EF606AEE08</RequestId><HostId>InxnG0tdH2wgO1mkZf06uhKySi3V0B+CVmoqB8DvEdSSqL1ZfFkOyNbvAjHy9IIspL/jC/sMoz0=</HostId></Error>\r\n[ERR] curl.cpp:CheckBucket(2689): Check bucket failed, S3 response: <?xml version=\"1.0\" encoding=\"UTF-8\"?><Error><Code>AuthorizationHeaderMalformed</Code><Message>The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'ap-northeast-1'</Message><Region>ap-northeast-1</Region><RequestId>0A2702EF606AEE08</RequestId><HostId>InxnG0tdH2wgO1mkZf06uhKySi3V0B+CVmoqB8DvEdSSqL1ZfFkOyNbvAjHy9IIspL/jC/sMoz0=</HostId></Error>\r\n[CRT] s3fs.cpp:s3fs_check_service(3694): Could not connect wrong region us-east-1, so retry to connect region ap-northeast-1.\r\n[INF]       curl.cpp:CheckBucket(2651): check a bucket.\r\n[INF]       curl.cpp:prepare_url(4145): URL is http://s3-ap-northeast-1.amazonaws.com/<my bucket>/\r\n[INF]       curl.cpp:prepare_url(4177): URL changed is http://<my bucket>.s3-ap-northeast-1.amazonaws.com/\r\n[INF]       curl.cpp:insertV4Headers(2073): computing signature [GET] [/] [] []\r\n[INF]       curl.cpp:url_to_host(99): url is http://s3-ap-northeast-1.amazonaws.com\r\n[DBG] curl.cpp:RequestPerform(1726): connecting to URL http://<my bucket>.s3-ap-northeast-1.amazonaws.com/\r\n[INF]       curl.cpp:RequestPerform(1760): HTTP response code 403 was returned, returning EPERM\r\n[DBG] curl.cpp:RequestPerform(1761): Body Text: <?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message><AWSAccessKeyId>AKIAI7DO55EKOHKZIM\r\nMA</AWSAccessKeyId><StringToSign>AWS4-HMAC-SHA256\r\n20160116T070246Z\r\n20160116/ap-northeast-1/s3/aws4_request\r\n52f5428044bb33e3b3cc8fd908f67fa86ed16469026f70bcdb55dfebaaadf94b</StringToSign><SignatureProvided>de3ce57245b89dc7a54f8bf83f924e066d18bf9a8f6dd1f58a09b02df4749487</SignatureProvided><StringToSignBytes>41 57\r\n53 34 2d 48 4d 41 43 2d 53 48 41 32 35 36 0a 32 30 31 36 30 31 31 36 54 30 37 30 32 34 36 5a 0a 32 30 31 36 30 31 31 36 2f 61 70 2d 6e 6f 72 74 68 65 61 73 74 2d 31 2f 73 33 2f 61 77 73 34 5f 72 65 71 75 65\r\n73 74 0a 35 32 66 35 34 32 38 30 34 34 62 62 33 33 65 33 62 33 63 63 38 66 64 39 30 38 66 36 37 66 61 38 36 65 64 31 36 34 36 39 30 32 36 66 37 30 62 63 64 62 35 35 64 66 65 62 61 61 61 64 66 39 34 62</Strin\r\ngToSignBytes><CanonicalRequest>GET\r\n/\r\n\r\nhost:<my bucket>.s3-ap-northeast-1.amazonaws.com\r\nx-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\r\nx-amz-date:20160116T070246Z\r\n\r\nhost;x-amz-content-sha256;x-amz-date\r\ne3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855</CanonicalRequest><CanonicalRequestBytes>47 45 54 0a 2f 0a 0a 68 6f 73 74 3a 67 67 74 61 6b 65 63 2d 73 33 66 73 2e 73 33 2d 61 70 2d 6e 6f 72\r\n 74 68 65 61 73 74 2d 31 2e 61 6d 61 7a 6f 6e 61 77 73 2e 63 6f 6d 0a 78 2d 61 6d 7a 2d 63 6f 6e 74 65 6e 74 2d 73 68 61 32 35 36 3a 65 33 62 30 63 34 34 32 39 38 66 63 31 63 31 34 39 61 66 62 66 34 63 38 39\r\n 39 36 66 62 39 32 34 32 37 61 65 34 31 65 34 36 34 39 62 39 33 34 63 61 34 39 35 39 39 31 62 37 38 35 32 62 38 35 35 0a 78 2d 61 6d 7a 2d 64 61 74 65 3a 32 30 31 36 30 31 31 36 54 30 37 30 32 34 36 5a 0a 0a\r\n 68 6f 73 74 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 0a 65 33 62 30 63 34 34 32 39 38 66 63 31 63 31 34 39 61 66 62 66 34 63 38 39 39 36 66 62 39 32 34\r\n 32 37 61 65 34 31 65 34 36 34 39 62 39 33 34 63 61 34 39 35 39 39 31 62 37 38 35 32 62 38 35 35</CanonicalRequestBytes><RequestId>EB63842348FE488A</RequestId><HostId>od6EbW9oNjX5HDmUqokLVtzri3qle1svqcY7bGyQ\r\nvQa6+gZ/ELdPjKl+fTG0lo9SY8ValgZ8RiQ=</HostId></Error>\r\n[ERR] curl.cpp:CheckBucket(2689): Check bucket failed, S3 response: <?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message><AWSAccessKeyId>AKIAI7DO55EKOHKZIM\r\nMA</AWSAccessKeyId><StringToSign>AWS4-HMAC-SHA256\r\n20160116T070246Z\r\n20160116/ap-northeast-1/s3/aws4_request\r\n52f5428044bb33e3b3cc8fd908f67fa86ed16469026f70bcdb55dfebaaadf94b</StringToSign><SignatureProvided>de3ce57245b89dc7a54f8bf83f924e066d18bf9a8f6dd1f58a09b02df4749487</SignatureProvided><StringToSignBytes>41 57\r\n53 34 2d 48 4d 41 43 2d 53 48 41 32 35 36 0a 32 30 31 36 30 31 31 36 54 30 37 30 32 34 36 5a 0a 32 30 31 36 30 31 31 36 2f 61 70 2d 6e 6f 72 74 68 65 61 73 74 2d 31 2f 73 33 2f 61 77 73 34 5f 72 65 71 75 65\r\n73 74 0a 35 32 66 35 34 32 38 30 34 34 62 62 33 33 65 33 62 33 63 63 38 66 64 39 30 38 66 36 37 66 61 38 36 65 64 31 36 34 36 39 30 32 36 66 37 30 62 63 64 62 35 35 64 66 65 62 61 61 61 64 66 39 34 62</Strin\r\ngToSignBytes><CanonicalRequest>GET\r\n/\r\n\r\nhost:<my bucket>.s3-ap-northeast-1.amazonaws.com\r\nx-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\r\nx-amz-date:20160116T070246Z\r\n\r\nhost;x-amz-content-sha256;x-amz-date\r\ne3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855</CanonicalRequest><CanonicalRequestBytes>47 45 54 0a 2f 0a 0a 68 6f 73 74 3a 67 67 74 61 6b 65 63 2d 73 33 66 73 2e 73 33 2d 61 70 2d 6e 6f 72\r\n 74 68 65 61 73 74 2d 31 2e 61 6d 61 7a 6f 6e 61 77 73 2e 63 6f 6d 0a 78 2d 61 6d 7a 2d 63 6f 6e 74 65 6e 74 2d 73 68 61 32 35 36 3a 65 33 62 30 63 34 34 32 39 38 66 63 31 63 31 34 39 61 66 62 66 34 63 38 39\r\n 39 36 66 62 39 32 34 32 37 61 65 34 31 65 34 36 34 39 62 39 33 34 63 61 34 39 35 39 39 31 62 37 38 35 32 62 38 35 35 0a 78 2d 61 6d 7a 2d 64 61 74 65 3a 32 30 31 36 30 31 31 36 54 30 37 30 32 34 36 5a 0a 0a\r\n 68 6f 73 74 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 0a 65 33 62 30 63 34 34 32 39 38 66 63 31 63 31 34 39 61 66 62 66 34 63 38 39 39 36 66 62 39 32 34\r\n 32 37 61 65 34 31 65 34 36 34 39 62 39 33 34 63 61 34 39 35 39 39 31 62 37 38 35 32 62 38 35 35</CanonicalRequestBytes><RequestId>EB63842348FE488A</RequestId><HostId>od6EbW9oNjX5HDmUqokLVtzri3qle1svqcY7bGyQ\r\nvQa6+gZ/ELdPjKl+fTG0lo9SY8ValgZ8RiQ=</HostId></Error>\r\n[WAN] s3fs.cpp:s3fs_check_service(3714): Could not connect, so retry to connect by signature version 2.\r\n[INF]       curl.cpp:CheckBucket(2651): check a bucket.\r\n[INF]       curl.cpp:prepare_url(4145): URL is http://s3-ap-northeast-1.amazonaws.com/<my bucket>/\r\n[INF]       curl.cpp:prepare_url(4177): URL changed is http://<my bucket>.s3-ap-northeast-1.amazonaws.com/\r\n[DBG] curl.cpp:RequestPerform(1726): connecting to URL http://<my bucket>.s3-ap-northeast-1.amazonaws.com/\r\n[INF]       curl.cpp:RequestPerform(1743): HTTP response code 200\r\n\r\n```\r\n\r\nOther Multipart GET/POST are so working without problems.\r\nPlease check codes about error.\r\n\r\nThanks in advance for your great help!"}}