{"action":"created","comment":{"url":"https://api.github.com/repos/minio/minio/pulls/comments/180497029","pull_request_review_id":110926873,"id":180497029,"diff_hunk":"@@ -601,10 +601,10 @@ func (api objectAPIHandlers) PostPolicyBucketHandler(w http.ResponseWriter, r *h\n \t}\n \n \tif objectAPI.IsEncryptionSupported() {\n-\t\tif hasSSECustomerHeader(formValues) && !hasSuffix(object, slashSeparator) { // handle SSE-C requests\n+\t\tif ContainsSSECustomerHeader(formValues) && !hasSuffix(object, slashSeparator) { // handle SSE-C requests","path":"cmd/bucket-handlers.go","position":5,"original_position":5,"commit_id":"9b0e98203210ea58d7e4b46e02d7fe3e3dba344a","original_commit_id":"9b0e98203210ea58d7e4b46e02d7fe3e3dba344a","user":{"login":"aead","id":20368805,"avatar_url":"https://avatars0.githubusercontent.com/u/20368805?v=4","gravatar_id":"","url":"https://api.github.com/users/aead","html_url":"https://github.com/aead","followers_url":"https://api.github.com/users/aead/followers","following_url":"https://api.github.com/users/aead/following{/other_user}","gists_url":"https://api.github.com/users/aead/gists{/gist_id}","starred_url":"https://api.github.com/users/aead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aead/subscriptions","organizations_url":"https://api.github.com/users/aead/orgs","repos_url":"https://api.github.com/users/aead/repos","events_url":"https://api.github.com/users/aead/events{/privacy}","received_events_url":"https://api.github.com/users/aead/received_events","type":"User","site_admin":false},"body":"Hm, I don't think so. If you think of somebody taking a look `/cmd` at e.g. https://godoc.org/github.com/minio/minio - there is no meaning to that doc. `cmd` \"randomly\" exports stuff.\r\nIf we don't follow a package-style conceptually for development I don't think we can argue that our code should follow a package-style... \r\n\r\nWhat I try to do is to make functions which should be used by \"clients\" - like another layer (in this case S3-layer) exported and low-level functions un-exported.\r\nTo give a concrete example:\r\n - [Intended for \"outer\" usage](https://github.com/minio/minio/pull/5802/files#diff-737914b14614fb9579da73077874ce5dR228)\r\n - [Intended for \"inner\" usage](https://github.com/minio/minio/pull/5802/files#diff-737914b14614fb9579da73077874ce5dR185)\r\n\r\nI don't think that exported vs. un-exported is something we can rely on using our current code architecture.","created_at":"2018-04-10T17:03:48Z","updated_at":"2018-04-10T17:03:48Z","html_url":"https://github.com/minio/minio/pull/5802#discussion_r180497029","pull_request_url":"https://api.github.com/repos/minio/minio/pulls/5802","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/minio/minio/pulls/comments/180497029"},"html":{"href":"https://github.com/minio/minio/pull/5802#discussion_r180497029"},"pull_request":{"href":"https://api.github.com/repos/minio/minio/pulls/5802"}},"in_reply_to_id":180489723},"pull_request":{"url":"https://api.github.com/repos/minio/minio/pulls/5802","id":180570962,"html_url":"https://github.com/minio/minio/pull/5802","diff_url":"https://github.com/minio/minio/pull/5802.diff","patch_url":"https://github.com/minio/minio/pull/5802.patch","issue_url":"https://api.github.com/repos/minio/minio/issues/5802","number":5802,"state":"open","locked":false,"title":"[SSE]: refactor SSE-C single part logic","user":{"login":"aead","id":20368805,"avatar_url":"https://avatars0.githubusercontent.com/u/20368805?v=4","gravatar_id":"","url":"https://api.github.com/users/aead","html_url":"https://github.com/aead","followers_url":"https://api.github.com/users/aead/followers","following_url":"https://api.github.com/users/aead/following{/other_user}","gists_url":"https://api.github.com/users/aead/gists{/gist_id}","starred_url":"https://api.github.com/users/aead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aead/subscriptions","organizations_url":"https://api.github.com/users/aead/orgs","repos_url":"https://api.github.com/users/aead/repos","events_url":"https://api.github.com/users/aead/events{/privacy}","received_events_url":"https://api.github.com/users/aead/received_events","type":"User","site_admin":false},"body":"## Description\r\n\r\nThis PR tries to simplify and reduce the code complexity of the SSE-C code.\r\nThe goal is to make the (SSE) security related code more explicit and easier to understand.\r\n\r\nTherefore this PR breaks larger functions into smaller ones and combines functionality to mirror the SSE-C approach of the server.  \r\n\r\n## Motivation and Context\r\nCleanup of grown code.\r\n\r\n## How Has This Been Tested?\r\nmanually + https://github.com/aead/s3\r\n\r\n## Types of changes\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n## Checklist:\r\n- [x] My code follows the code style of this project.\r\n- [ ] My change requires a change to the documentation.\r\n- [ ] I have updated the documentation accordingly.\r\n- [x] I have added unit tests to cover my changes.\r\n- [ ] I have added/updated functional tests in [mint](https://github.com/minio/mint). (If yes, add `mint` PR # here: )\r\n- [x] All new and existing tests passed.","created_at":"2018-04-10T11:28:52Z","updated_at":"2018-04-10T17:03:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef3dc593fdfc38553c41cf4461ab51fadedeeb24","assignee":null,"assignees":[],"requested_reviewers":[{"login":"donatello","id":200059,"avatar_url":"https://avatars0.githubusercontent.com/u/200059?v=4","gravatar_id":"","url":"https://api.github.com/users/donatello","html_url":"https://github.com/donatello","followers_url":"https://api.github.com/users/donatello/followers","following_url":"https://api.github.com/users/donatello/following{/other_user}","gists_url":"https://api.github.com/users/donatello/gists{/gist_id}","starred_url":"https://api.github.com/users/donatello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donatello/subscriptions","organizations_url":"https://api.github.com/users/donatello/orgs","repos_url":"https://api.github.com/users/donatello/repos","events_url":"https://api.github.com/users/donatello/events{/privacy}","received_events_url":"https://api.github.com/users/donatello/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/minio/minio/pulls/5802/commits","review_comments_url":"https://api.github.com/repos/minio/minio/pulls/5802/comments","review_comment_url":"https://api.github.com/repos/minio/minio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/minio/minio/issues/5802/comments","statuses_url":"https://api.github.com/repos/minio/minio/statuses/9b0e98203210ea58d7e4b46e02d7fe3e3dba344a","head":{"label":"aead:sse-refactor","ref":"sse-refactor","sha":"9b0e98203210ea58d7e4b46e02d7fe3e3dba344a","user":{"login":"aead","id":20368805,"avatar_url":"https://avatars0.githubusercontent.com/u/20368805?v=4","gravatar_id":"","url":"https://api.github.com/users/aead","html_url":"https://github.com/aead","followers_url":"https://api.github.com/users/aead/followers","following_url":"https://api.github.com/users/aead/following{/other_user}","gists_url":"https://api.github.com/users/aead/gists{/gist_id}","starred_url":"https://api.github.com/users/aead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aead/subscriptions","organizations_url":"https://api.github.com/users/aead/orgs","repos_url":"https://api.github.com/users/aead/repos","events_url":"https://api.github.com/users/aead/events{/privacy}","received_events_url":"https://api.github.com/users/aead/received_events","type":"User","site_admin":false},"repo":{"id":77345144,"name":"minio","full_name":"aead/minio","owner":{"login":"aead","id":20368805,"avatar_url":"https://avatars0.githubusercontent.com/u/20368805?v=4","gravatar_id":"","url":"https://api.github.com/users/aead","html_url":"https://github.com/aead","followers_url":"https://api.github.com/users/aead/followers","following_url":"https://api.github.com/users/aead/following{/other_user}","gists_url":"https://api.github.com/users/aead/gists{/gist_id}","starred_url":"https://api.github.com/users/aead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aead/subscriptions","organizations_url":"https://api.github.com/users/aead/orgs","repos_url":"https://api.github.com/users/aead/repos","events_url":"https://api.github.com/users/aead/events{/privacy}","received_events_url":"https://api.github.com/users/aead/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aead/minio","description":"Minio is an Amazon S3 compatible object storage server.","fork":true,"url":"https://api.github.com/repos/aead/minio","forks_url":"https://api.github.com/repos/aead/minio/forks","keys_url":"https://api.github.com/repos/aead/minio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aead/minio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aead/minio/teams","hooks_url":"https://api.github.com/repos/aead/minio/hooks","issue_events_url":"https://api.github.com/repos/aead/minio/issues/events{/number}","events_url":"https://api.github.com/repos/aead/minio/events","assignees_url":"https://api.github.com/repos/aead/minio/assignees{/user}","branches_url":"https://api.github.com/repos/aead/minio/branches{/branch}","tags_url":"https://api.github.com/repos/aead/minio/tags","blobs_url":"https://api.github.com/repos/aead/minio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aead/minio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aead/minio/git/refs{/sha}","trees_url":"https://api.github.com/repos/aead/minio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aead/minio/statuses/{sha}","languages_url":"https://api.github.com/repos/aead/minio/languages","stargazers_url":"https://api.github.com/repos/aead/minio/stargazers","contributors_url":"https://api.github.com/repos/aead/minio/contributors","subscribers_url":"https://api.github.com/repos/aead/minio/subscribers","subscription_url":"https://api.github.com/repos/aead/minio/subscription","commits_url":"https://api.github.com/repos/aead/minio/commits{/sha}","git_commits_url":"https://api.github.com/repos/aead/minio/git/commits{/sha}","comments_url":"https://api.github.com/repos/aead/minio/comments{/number}","issue_comment_url":"https://api.github.com/repos/aead/minio/issues/comments{/number}","contents_url":"https://api.github.com/repos/aead/minio/contents/{+path}","compare_url":"https://api.github.com/repos/aead/minio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aead/minio/merges","archive_url":"https://api.github.com/repos/aead/minio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aead/minio/downloads","issues_url":"https://api.github.com/repos/aead/minio/issues{/number}","pulls_url":"https://api.github.com/repos/aead/minio/pulls{/number}","milestones_url":"https://api.github.com/repos/aead/minio/milestones{/number}","notifications_url":"https://api.github.com/repos/aead/minio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aead/minio/labels{/name}","releases_url":"https://api.github.com/repos/aead/minio/releases{/id}","deployments_url":"https://api.github.com/repos/aead/minio/deployments","created_at":"2016-12-25T22:27:29Z","updated_at":"2016-12-25T22:27:32Z","pushed_at":"2018-04-10T09:13:16Z","git_url":"git://github.com/aead/minio.git","ssh_url":"git@github.com:aead/minio.git","clone_url":"https://github.com/aead/minio.git","svn_url":"https://github.com/aead/minio","homepage":"https://minio.io","size":34777,"stargazers_count":0,"watchers_count":0,"language":"Go","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":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"minio:master","ref":"master","sha":"217fb470a751bc3e1d7426ba1a587dae533a0c02","user":{"login":"minio","id":695951,"avatar_url":"https://avatars3.githubusercontent.com/u/695951?v=4","gravatar_id":"","url":"https://api.github.com/users/minio","html_url":"https://github.com/minio","followers_url":"https://api.github.com/users/minio/followers","following_url":"https://api.github.com/users/minio/following{/other_user}","gists_url":"https://api.github.com/users/minio/gists{/gist_id}","starred_url":"https://api.github.com/users/minio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minio/subscriptions","organizations_url":"https://api.github.com/users/minio/orgs","repos_url":"https://api.github.com/users/minio/repos","events_url":"https://api.github.com/users/minio/events{/privacy}","received_events_url":"https://api.github.com/users/minio/received_events","type":"Organization","site_admin":false},"repo":{"id":29261473,"name":"minio","full_name":"minio/minio","owner":{"login":"minio","id":695951,"avatar_url":"https://avatars3.githubusercontent.com/u/695951?v=4","gravatar_id":"","url":"https://api.github.com/users/minio","html_url":"https://github.com/minio","followers_url":"https://api.github.com/users/minio/followers","following_url":"https://api.github.com/users/minio/following{/other_user}","gists_url":"https://api.github.com/users/minio/gists{/gist_id}","starred_url":"https://api.github.com/users/minio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minio/subscriptions","organizations_url":"https://api.github.com/users/minio/orgs","repos_url":"https://api.github.com/users/minio/repos","events_url":"https://api.github.com/users/minio/events{/privacy}","received_events_url":"https://api.github.com/users/minio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/minio/minio","description":"Minio is an open source object storage server compatible with Amazon S3 APIs","fork":false,"url":"https://api.github.com/repos/minio/minio","forks_url":"https://api.github.com/repos/minio/minio/forks","keys_url":"https://api.github.com/repos/minio/minio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/minio/minio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/minio/minio/teams","hooks_url":"https://api.github.com/repos/minio/minio/hooks","issue_events_url":"https://api.github.com/repos/minio/minio/issues/events{/number}","events_url":"https://api.github.com/repos/minio/minio/events","assignees_url":"https://api.github.com/repos/minio/minio/assignees{/user}","branches_url":"https://api.github.com/repos/minio/minio/branches{/branch}","tags_url":"https://api.github.com/repos/minio/minio/tags","blobs_url":"https://api.github.com/repos/minio/minio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/minio/minio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/minio/minio/git/refs{/sha}","trees_url":"https://api.github.com/repos/minio/minio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/minio/minio/statuses/{sha}","languages_url":"https://api.github.com/repos/minio/minio/languages","stargazers_url":"https://api.github.com/repos/minio/minio/stargazers","contributors_url":"https://api.github.com/repos/minio/minio/contributors","subscribers_url":"https://api.github.com/repos/minio/minio/subscribers","subscription_url":"https://api.github.com/repos/minio/minio/subscription","commits_url":"https://api.github.com/repos/minio/minio/commits{/sha}","git_commits_url":"https://api.github.com/repos/minio/minio/git/commits{/sha}","comments_url":"https://api.github.com/repos/minio/minio/comments{/number}","issue_comment_url":"https://api.github.com/repos/minio/minio/issues/comments{/number}","contents_url":"https://api.github.com/repos/minio/minio/contents/{+path}","compare_url":"https://api.github.com/repos/minio/minio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/minio/minio/merges","archive_url":"https://api.github.com/repos/minio/minio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/minio/minio/downloads","issues_url":"https://api.github.com/repos/minio/minio/issues{/number}","pulls_url":"https://api.github.com/repos/minio/minio/pulls{/number}","milestones_url":"https://api.github.com/repos/minio/minio/milestones{/number}","notifications_url":"https://api.github.com/repos/minio/minio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/minio/minio/labels{/name}","releases_url":"https://api.github.com/repos/minio/minio/releases{/id}","deployments_url":"https://api.github.com/repos/minio/minio/deployments","created_at":"2015-01-14T19:23:58Z","updated_at":"2018-04-10T16:37:21Z","pushed_at":"2018-04-10T16:37:16Z","git_url":"git://github.com/minio/minio.git","ssh_url":"git@github.com:minio/minio.git","clone_url":"https://github.com/minio/minio.git","svn_url":"https://github.com/minio/minio","homepage":"https://minio.io/downloads.html#download-server","size":34823,"stargazers_count":10873,"watchers_count":10873,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":911,"mirror_url":null,"archived":false,"open_issues_count":122,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":911,"open_issues":122,"watchers":10873,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/minio/minio/pulls/5802"},"html":{"href":"https://github.com/minio/minio/pull/5802"},"issue":{"href":"https://api.github.com/repos/minio/minio/issues/5802"},"comments":{"href":"https://api.github.com/repos/minio/minio/issues/5802/comments"},"review_comments":{"href":"https://api.github.com/repos/minio/minio/pulls/5802/comments"},"review_comment":{"href":"https://api.github.com/repos/minio/minio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/minio/minio/pulls/5802/commits"},"statuses":{"href":"https://api.github.com/repos/minio/minio/statuses/9b0e98203210ea58d7e4b46e02d7fe3e3dba344a"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"aead"}}