{"action":"created","comment":{"url":"https://api.github.com/repos/iij/mruby-aws-s3/pulls/comments/178223573","pull_request_review_id":108253230,"id":178223573,"diff_hunk":"@@ -38,18 +41,17 @@ def calculate_signature(method, path, headers)\n       method = method.upcase\n       time = Time.now.utc\n       path = \"/#{path}\" unless path.start_with? '/'\n-      path = \"/#{@bucket_name}#{path}\"\n \n-      headers['x-amz-content-sha256'] = Digest::SHA256.hexdigest(headers['Body']) unless\n-        headers['x-amz-content-sha256']\n+      headers['Host'] = @s3_endpoint.host\n+      headers['x-amz-content-sha256'] = Digest::SHA256.hexdigest(headers['Body'])\n       headers['x-amz-security-token'] = @security_token if @security_token\n       headers['Date'] = headers['x-amz-date'] = time.strftime(\"%Y%m%dT%H%M%SZ\")\n       if method == 'PUT'\n         headers['Content-Length'] = headers['Body'].bytesize\n         headers['Content-Encoding'] = 'aws-chunked'\n       end\n       headers['Accept'] = SimpleHttp::DEFAULT_ACCEPT\n-      headers['Connection'] = 'close'\n+      headers['Connection'] = 'keep-alive'","path":"mrblib/aws-s3.rb","position":66,"original_position":66,"commit_id":"0b240d07eb01019236a941d67d1fc587c3074698","original_commit_id":"0b240d07eb01019236a941d67d1fc587c3074698","user":{"login":"take-cheeze","id":162074,"avatar_url":"https://avatars2.githubusercontent.com/u/162074?v=4","gravatar_id":"","url":"https://api.github.com/users/take-cheeze","html_url":"https://github.com/take-cheeze","followers_url":"https://api.github.com/users/take-cheeze/followers","following_url":"https://api.github.com/users/take-cheeze/following{/other_user}","gists_url":"https://api.github.com/users/take-cheeze/gists{/gist_id}","starred_url":"https://api.github.com/users/take-cheeze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/take-cheeze/subscriptions","organizations_url":"https://api.github.com/users/take-cheeze/orgs","repos_url":"https://api.github.com/users/take-cheeze/repos","events_url":"https://api.github.com/users/take-cheeze/events{/privacy}","received_events_url":"https://api.github.com/users/take-cheeze/received_events","type":"User","site_admin":false},"body":"BTW simplehttp forces `close` somehow. Maybe need fix for it too...\r\nhttps://github.com/matsumotory/mruby-simplehttp/blob/de9c250eadfabf48e289cbf5039b47e12a691ccb/mrblib/simplehttp.rb#L194","created_at":"2018-03-30T02:40:06Z","updated_at":"2018-03-30T02:40:06Z","html_url":"https://github.com/iij/mruby-aws-s3/pull/9#discussion_r178223573","pull_request_url":"https://api.github.com/repos/iij/mruby-aws-s3/pulls/9","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/iij/mruby-aws-s3/pulls/comments/178223573"},"html":{"href":"https://github.com/iij/mruby-aws-s3/pull/9#discussion_r178223573"},"pull_request":{"href":"https://api.github.com/repos/iij/mruby-aws-s3/pulls/9"}},"in_reply_to_id":178221135},"pull_request":{"url":"https://api.github.com/repos/iij/mruby-aws-s3/pulls/9","id":159163476,"html_url":"https://github.com/iij/mruby-aws-s3/pull/9","diff_url":"https://github.com/iij/mruby-aws-s3/pull/9.diff","patch_url":"https://github.com/iij/mruby-aws-s3/pull/9.patch","issue_url":"https://api.github.com/repos/iij/mruby-aws-s3/issues/9","number":9,"state":"open","locked":false,"title":"Fix a bug with signature and refactor","user":{"login":"Naughie","id":22370774,"avatar_url":"https://avatars2.githubusercontent.com/u/22370774?v=4","gravatar_id":"","url":"https://api.github.com/users/Naughie","html_url":"https://github.com/Naughie","followers_url":"https://api.github.com/users/Naughie/followers","following_url":"https://api.github.com/users/Naughie/following{/other_user}","gists_url":"https://api.github.com/users/Naughie/gists{/gist_id}","starred_url":"https://api.github.com/users/Naughie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Naughie/subscriptions","organizations_url":"https://api.github.com/users/Naughie/orgs","repos_url":"https://api.github.com/users/Naughie/repos","events_url":"https://api.github.com/users/Naughie/events{/privacy}","received_events_url":"https://api.github.com/users/Naughie/received_events","type":"User","site_admin":false},"body":"- Wrong endpoint and headers;\r\n- verbosity in calculating signature.","created_at":"2017-12-19T13:14:07Z","updated_at":"2018-03-30T02:40:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"31cf39bf51e260624f524fd64d013454b2faba42","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/iij/mruby-aws-s3/pulls/9/commits","review_comments_url":"https://api.github.com/repos/iij/mruby-aws-s3/pulls/9/comments","review_comment_url":"https://api.github.com/repos/iij/mruby-aws-s3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iij/mruby-aws-s3/issues/9/comments","statuses_url":"https://api.github.com/repos/iij/mruby-aws-s3/statuses/0b240d07eb01019236a941d67d1fc587c3074698","head":{"label":"Naughie:master","ref":"master","sha":"0b240d07eb01019236a941d67d1fc587c3074698","user":{"login":"Naughie","id":22370774,"avatar_url":"https://avatars2.githubusercontent.com/u/22370774?v=4","gravatar_id":"","url":"https://api.github.com/users/Naughie","html_url":"https://github.com/Naughie","followers_url":"https://api.github.com/users/Naughie/followers","following_url":"https://api.github.com/users/Naughie/following{/other_user}","gists_url":"https://api.github.com/users/Naughie/gists{/gist_id}","starred_url":"https://api.github.com/users/Naughie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Naughie/subscriptions","organizations_url":"https://api.github.com/users/Naughie/orgs","repos_url":"https://api.github.com/users/Naughie/repos","events_url":"https://api.github.com/users/Naughie/events{/privacy}","received_events_url":"https://api.github.com/users/Naughie/received_events","type":"User","site_admin":false},"repo":{"id":114451898,"name":"mruby-aws-s3","full_name":"Naughie/mruby-aws-s3","owner":{"login":"Naughie","id":22370774,"avatar_url":"https://avatars2.githubusercontent.com/u/22370774?v=4","gravatar_id":"","url":"https://api.github.com/users/Naughie","html_url":"https://github.com/Naughie","followers_url":"https://api.github.com/users/Naughie/followers","following_url":"https://api.github.com/users/Naughie/following{/other_user}","gists_url":"https://api.github.com/users/Naughie/gists{/gist_id}","starred_url":"https://api.github.com/users/Naughie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Naughie/subscriptions","organizations_url":"https://api.github.com/users/Naughie/orgs","repos_url":"https://api.github.com/users/Naughie/repos","events_url":"https://api.github.com/users/Naughie/events{/privacy}","received_events_url":"https://api.github.com/users/Naughie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Naughie/mruby-aws-s3","description":"Client library for Amazon's Simple Storage Service's REST API","fork":true,"url":"https://api.github.com/repos/Naughie/mruby-aws-s3","forks_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/forks","keys_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/teams","hooks_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/hooks","issue_events_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/issues/events{/number}","events_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/events","assignees_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/assignees{/user}","branches_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/branches{/branch}","tags_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/tags","blobs_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/git/refs{/sha}","trees_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/statuses/{sha}","languages_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/languages","stargazers_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/stargazers","contributors_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/contributors","subscribers_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/subscribers","subscription_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/subscription","commits_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/commits{/sha}","git_commits_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/git/commits{/sha}","comments_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/comments{/number}","issue_comment_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/issues/comments{/number}","contents_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/contents/{+path}","compare_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/merges","archive_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/downloads","issues_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/issues{/number}","pulls_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/pulls{/number}","milestones_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/milestones{/number}","notifications_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/labels{/name}","releases_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/releases{/id}","deployments_url":"https://api.github.com/repos/Naughie/mruby-aws-s3/deployments","created_at":"2017-12-16T10:22:47Z","updated_at":"2017-12-16T10:22:49Z","pushed_at":"2018-02-08T10:05:01Z","git_url":"git://github.com/Naughie/mruby-aws-s3.git","ssh_url":"git@github.com:Naughie/mruby-aws-s3.git","clone_url":"https://github.com/Naughie/mruby-aws-s3.git","svn_url":"https://github.com/Naughie/mruby-aws-s3","homepage":null,"size":13,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"iij:master","ref":"master","sha":"0a112745ac77231b1c3f3d66c1aa13763d0c8d38","user":{"login":"iij","id":2141544,"avatar_url":"https://avatars3.githubusercontent.com/u/2141544?v=4","gravatar_id":"","url":"https://api.github.com/users/iij","html_url":"https://github.com/iij","followers_url":"https://api.github.com/users/iij/followers","following_url":"https://api.github.com/users/iij/following{/other_user}","gists_url":"https://api.github.com/users/iij/gists{/gist_id}","starred_url":"https://api.github.com/users/iij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iij/subscriptions","organizations_url":"https://api.github.com/users/iij/orgs","repos_url":"https://api.github.com/users/iij/repos","events_url":"https://api.github.com/users/iij/events{/privacy}","received_events_url":"https://api.github.com/users/iij/received_events","type":"Organization","site_admin":false},"repo":{"id":7497640,"name":"mruby-aws-s3","full_name":"iij/mruby-aws-s3","owner":{"login":"iij","id":2141544,"avatar_url":"https://avatars3.githubusercontent.com/u/2141544?v=4","gravatar_id":"","url":"https://api.github.com/users/iij","html_url":"https://github.com/iij","followers_url":"https://api.github.com/users/iij/followers","following_url":"https://api.github.com/users/iij/following{/other_user}","gists_url":"https://api.github.com/users/iij/gists{/gist_id}","starred_url":"https://api.github.com/users/iij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iij/subscriptions","organizations_url":"https://api.github.com/users/iij/orgs","repos_url":"https://api.github.com/users/iij/repos","events_url":"https://api.github.com/users/iij/events{/privacy}","received_events_url":"https://api.github.com/users/iij/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iij/mruby-aws-s3","description":"Client library for Amazon's Simple Storage Service's REST API","fork":false,"url":"https://api.github.com/repos/iij/mruby-aws-s3","forks_url":"https://api.github.com/repos/iij/mruby-aws-s3/forks","keys_url":"https://api.github.com/repos/iij/mruby-aws-s3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iij/mruby-aws-s3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iij/mruby-aws-s3/teams","hooks_url":"https://api.github.com/repos/iij/mruby-aws-s3/hooks","issue_events_url":"https://api.github.com/repos/iij/mruby-aws-s3/issues/events{/number}","events_url":"https://api.github.com/repos/iij/mruby-aws-s3/events","assignees_url":"https://api.github.com/repos/iij/mruby-aws-s3/assignees{/user}","branches_url":"https://api.github.com/repos/iij/mruby-aws-s3/branches{/branch}","tags_url":"https://api.github.com/repos/iij/mruby-aws-s3/tags","blobs_url":"https://api.github.com/repos/iij/mruby-aws-s3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iij/mruby-aws-s3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iij/mruby-aws-s3/git/refs{/sha}","trees_url":"https://api.github.com/repos/iij/mruby-aws-s3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iij/mruby-aws-s3/statuses/{sha}","languages_url":"https://api.github.com/repos/iij/mruby-aws-s3/languages","stargazers_url":"https://api.github.com/repos/iij/mruby-aws-s3/stargazers","contributors_url":"https://api.github.com/repos/iij/mruby-aws-s3/contributors","subscribers_url":"https://api.github.com/repos/iij/mruby-aws-s3/subscribers","subscription_url":"https://api.github.com/repos/iij/mruby-aws-s3/subscription","commits_url":"https://api.github.com/repos/iij/mruby-aws-s3/commits{/sha}","git_commits_url":"https://api.github.com/repos/iij/mruby-aws-s3/git/commits{/sha}","comments_url":"https://api.github.com/repos/iij/mruby-aws-s3/comments{/number}","issue_comment_url":"https://api.github.com/repos/iij/mruby-aws-s3/issues/comments{/number}","contents_url":"https://api.github.com/repos/iij/mruby-aws-s3/contents/{+path}","compare_url":"https://api.github.com/repos/iij/mruby-aws-s3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iij/mruby-aws-s3/merges","archive_url":"https://api.github.com/repos/iij/mruby-aws-s3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iij/mruby-aws-s3/downloads","issues_url":"https://api.github.com/repos/iij/mruby-aws-s3/issues{/number}","pulls_url":"https://api.github.com/repos/iij/mruby-aws-s3/pulls{/number}","milestones_url":"https://api.github.com/repos/iij/mruby-aws-s3/milestones{/number}","notifications_url":"https://api.github.com/repos/iij/mruby-aws-s3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iij/mruby-aws-s3/labels{/name}","releases_url":"https://api.github.com/repos/iij/mruby-aws-s3/releases{/id}","deployments_url":"https://api.github.com/repos/iij/mruby-aws-s3/deployments","created_at":"2013-01-08T07:45:03Z","updated_at":"2018-03-15T09:23:51Z","pushed_at":"2018-02-08T10:05:03Z","git_url":"git://github.com/iij/mruby-aws-s3.git","ssh_url":"git@github.com:iij/mruby-aws-s3.git","clone_url":"https://github.com/iij/mruby-aws-s3.git","svn_url":"https://github.com/iij/mruby-aws-s3","homepage":null,"size":11,"stargazers_count":9,"watchers_count":9,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":6,"open_issues":3,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iij/mruby-aws-s3/pulls/9"},"html":{"href":"https://github.com/iij/mruby-aws-s3/pull/9"},"issue":{"href":"https://api.github.com/repos/iij/mruby-aws-s3/issues/9"},"comments":{"href":"https://api.github.com/repos/iij/mruby-aws-s3/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/iij/mruby-aws-s3/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/iij/mruby-aws-s3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iij/mruby-aws-s3/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/iij/mruby-aws-s3/statuses/0b240d07eb01019236a941d67d1fc587c3074698"}},"author_association":"NONE"}}
{"actor":{"display_login":"take-cheeze"}}