{"action":"created","comment":{"url":"https://api.github.com/repos/bosnet/sebak/pulls/comments/228071671","pull_request_review_id":168253613,"id":228071671,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODA3MTY3MQ==","diff_hunk":"@@ -2,13 +2,23 @@ package common\n \n import (\n \t\"net/http\"\n+\t\"strings\"\n \n \t\"github.com/gorilla/mux\"\n )\n \n func PostAndJSONMatcher(r *http.Request, rm *mux.RouteMatch) bool {\n \tif r.Method == \"POST\" {\n-\t\tif r.Header.Get(\"Content-Type\") != \"application/json\" {\n+\t\tct := r.Header.Get(\"Content-Type\")\n+\t\tif len(strings.TrimSpace(ct)) < 1 {\n+\t\t\treturn false\n+\t\t}\n+\t\tspl := strings.SplitN(ct, \";\", 2)\n+\t\tif len(spl) == 2 {","path":"lib/common/router.go","position":17,"original_position":17,"commit_id":"cb1aca27ffab51472c6cafc5ce99657d9604ce45","original_commit_id":"cb1aca27ffab51472c6cafc5ce99657d9604ce45","user":{"login":"Geod24","id":2180215,"node_id":"MDQ6VXNlcjIxODAyMTU=","avatar_url":"https://avatars0.githubusercontent.com/u/2180215?v=4","gravatar_id":"","url":"https://api.github.com/users/Geod24","html_url":"https://github.com/Geod24","followers_url":"https://api.github.com/users/Geod24/followers","following_url":"https://api.github.com/users/Geod24/following{/other_user}","gists_url":"https://api.github.com/users/Geod24/gists{/gist_id}","starred_url":"https://api.github.com/users/Geod24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Geod24/subscriptions","organizations_url":"https://api.github.com/users/Geod24/orgs","repos_url":"https://api.github.com/users/Geod24/repos","events_url":"https://api.github.com/users/Geod24/events{/privacy}","received_events_url":"https://api.github.com/users/Geod24/received_events","type":"User","site_admin":false},"body":"`Content-Type` can have any number of parameters (https://www.w3.org/Protocols/rfc1341/4_Content-Type.html) so we should just take the first entry, always.","created_at":"2018-10-25T08:07:45Z","updated_at":"2018-10-25T08:07:46Z","html_url":"https://github.com/bosnet/sebak/pull/604#discussion_r228071671","pull_request_url":"https://api.github.com/repos/bosnet/sebak/pulls/604","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/bosnet/sebak/pulls/comments/228071671"},"html":{"href":"https://github.com/bosnet/sebak/pull/604#discussion_r228071671"},"pull_request":{"href":"https://api.github.com/repos/bosnet/sebak/pulls/604"}}},"pull_request":{"url":"https://api.github.com/repos/bosnet/sebak/pulls/604","id":225658101,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1NjU4MTAx","html_url":"https://github.com/bosnet/sebak/pull/604","diff_url":"https://github.com/bosnet/sebak/pull/604.diff","patch_url":"https://github.com/bosnet/sebak/pull/604.patch","issue_url":"https://api.github.com/repos/bosnet/sebak/issues/604","number":604,"state":"open","locked":false,"title":"Allow the additional tags in 'Content-Type' header like 'charset'","user":{"login":"spikeekips","id":174565,"node_id":"MDQ6VXNlcjE3NDU2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/174565?v=4","gravatar_id":"","url":"https://api.github.com/users/spikeekips","html_url":"https://github.com/spikeekips","followers_url":"https://api.github.com/users/spikeekips/followers","following_url":"https://api.github.com/users/spikeekips/following{/other_user}","gists_url":"https://api.github.com/users/spikeekips/gists{/gist_id}","starred_url":"https://api.github.com/users/spikeekips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spikeekips/subscriptions","organizations_url":"https://api.github.com/users/spikeekips/orgs","repos_url":"https://api.github.com/users/spikeekips/repos","events_url":"https://api.github.com/users/spikeekips/events{/privacy}","received_events_url":"https://api.github.com/users/spikeekips/received_events","type":"User","site_admin":false},"body":"### Github Issue\r\nresolves #590 \r\n\r\n### Background\r\n\r\nWallet client are suffering this problem, #590 \r\n\r\n### Solution\r\n\r\n`common.PostAndJSONMatcher()` patched.","created_at":"2018-10-25T07:58:08Z","updated_at":"2018-10-25T08:07:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0a4c41f3ea8627c35a1d8ad977927c59ca534634","assignee":{"login":"spikeekips","id":174565,"node_id":"MDQ6VXNlcjE3NDU2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/174565?v=4","gravatar_id":"","url":"https://api.github.com/users/spikeekips","html_url":"https://github.com/spikeekips","followers_url":"https://api.github.com/users/spikeekips/followers","following_url":"https://api.github.com/users/spikeekips/following{/other_user}","gists_url":"https://api.github.com/users/spikeekips/gists{/gist_id}","starred_url":"https://api.github.com/users/spikeekips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spikeekips/subscriptions","organizations_url":"https://api.github.com/users/spikeekips/orgs","repos_url":"https://api.github.com/users/spikeekips/repos","events_url":"https://api.github.com/users/spikeekips/events{/privacy}","received_events_url":"https://api.github.com/users/spikeekips/received_events","type":"User","site_admin":false},"assignees":[{"login":"spikeekips","id":174565,"node_id":"MDQ6VXNlcjE3NDU2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/174565?v=4","gravatar_id":"","url":"https://api.github.com/users/spikeekips","html_url":"https://github.com/spikeekips","followers_url":"https://api.github.com/users/spikeekips/followers","following_url":"https://api.github.com/users/spikeekips/following{/other_user}","gists_url":"https://api.github.com/users/spikeekips/gists{/gist_id}","starred_url":"https://api.github.com/users/spikeekips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spikeekips/subscriptions","organizations_url":"https://api.github.com/users/spikeekips/orgs","repos_url":"https://api.github.com/users/spikeekips/repos","events_url":"https://api.github.com/users/spikeekips/events{/privacy}","received_events_url":"https://api.github.com/users/spikeekips/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":904295035,"node_id":"MDU6TGFiZWw5MDQyOTUwMzU=","url":"https://api.github.com/repos/bosnet/sebak/labels/bug","name":"bug","color":"d73a4a","default":true}],"milestone":{"url":"https://api.github.com/repos/bosnet/sebak/milestones/4","html_url":"https://github.com/bosnet/sebak/milestone/4","labels_url":"https://api.github.com/repos/bosnet/sebak/milestones/4/labels","id":3766875,"node_id":"MDk6TWlsZXN0b25lMzc2Njg3NQ==","number":4,"title":"Toward v0.1.0","description":"","creator":{"login":"spikeekips","id":174565,"node_id":"MDQ6VXNlcjE3NDU2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/174565?v=4","gravatar_id":"","url":"https://api.github.com/users/spikeekips","html_url":"https://github.com/spikeekips","followers_url":"https://api.github.com/users/spikeekips/followers","following_url":"https://api.github.com/users/spikeekips/following{/other_user}","gists_url":"https://api.github.com/users/spikeekips/gists{/gist_id}","starred_url":"https://api.github.com/users/spikeekips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spikeekips/subscriptions","organizations_url":"https://api.github.com/users/spikeekips/orgs","repos_url":"https://api.github.com/users/spikeekips/repos","events_url":"https://api.github.com/users/spikeekips/events{/privacy}","received_events_url":"https://api.github.com/users/spikeekips/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2018-10-24T22:16:02Z","updated_at":"2018-10-25T07:58:35Z","due_on":"2018-11-16T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/bosnet/sebak/pulls/604/commits","review_comments_url":"https://api.github.com/repos/bosnet/sebak/pulls/604/comments","review_comment_url":"https://api.github.com/repos/bosnet/sebak/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bosnet/sebak/issues/604/comments","statuses_url":"https://api.github.com/repos/bosnet/sebak/statuses/cb1aca27ffab51472c6cafc5ce99657d9604ce45","head":{"label":"spikeekips:590-content-type-with-charset","ref":"590-content-type-with-charset","sha":"cb1aca27ffab51472c6cafc5ce99657d9604ce45","user":{"login":"spikeekips","id":174565,"node_id":"MDQ6VXNlcjE3NDU2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/174565?v=4","gravatar_id":"","url":"https://api.github.com/users/spikeekips","html_url":"https://github.com/spikeekips","followers_url":"https://api.github.com/users/spikeekips/followers","following_url":"https://api.github.com/users/spikeekips/following{/other_user}","gists_url":"https://api.github.com/users/spikeekips/gists{/gist_id}","starred_url":"https://api.github.com/users/spikeekips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spikeekips/subscriptions","organizations_url":"https://api.github.com/users/spikeekips/orgs","repos_url":"https://api.github.com/users/spikeekips/repos","events_url":"https://api.github.com/users/spikeekips/events{/privacy}","received_events_url":"https://api.github.com/users/spikeekips/received_events","type":"User","site_admin":false},"repo":{"id":137310734,"node_id":"MDEwOlJlcG9zaXRvcnkxMzczMTA3MzQ=","name":"sebak","full_name":"spikeekips/sebak","private":false,"owner":{"login":"spikeekips","id":174565,"node_id":"MDQ6VXNlcjE3NDU2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/174565?v=4","gravatar_id":"","url":"https://api.github.com/users/spikeekips","html_url":"https://github.com/spikeekips","followers_url":"https://api.github.com/users/spikeekips/followers","following_url":"https://api.github.com/users/spikeekips/following{/other_user}","gists_url":"https://api.github.com/users/spikeekips/gists{/gist_id}","starred_url":"https://api.github.com/users/spikeekips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spikeekips/subscriptions","organizations_url":"https://api.github.com/users/spikeekips/orgs","repos_url":"https://api.github.com/users/spikeekips/repos","events_url":"https://api.github.com/users/spikeekips/events{/privacy}","received_events_url":"https://api.github.com/users/spikeekips/received_events","type":"User","site_admin":false},"html_url":"https://github.com/spikeekips/sebak","description":"SEBAK, the next BOScoin Tokennet with ISAAC consensus protocol","fork":true,"url":"https://api.github.com/repos/spikeekips/sebak","forks_url":"https://api.github.com/repos/spikeekips/sebak/forks","keys_url":"https://api.github.com/repos/spikeekips/sebak/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spikeekips/sebak/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spikeekips/sebak/teams","hooks_url":"https://api.github.com/repos/spikeekips/sebak/hooks","issue_events_url":"https://api.github.com/repos/spikeekips/sebak/issues/events{/number}","events_url":"https://api.github.com/repos/spikeekips/sebak/events","assignees_url":"https://api.github.com/repos/spikeekips/sebak/assignees{/user}","branches_url":"https://api.github.com/repos/spikeekips/sebak/branches{/branch}","tags_url":"https://api.github.com/repos/spikeekips/sebak/tags","blobs_url":"https://api.github.com/repos/spikeekips/sebak/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spikeekips/sebak/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spikeekips/sebak/git/refs{/sha}","trees_url":"https://api.github.com/repos/spikeekips/sebak/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spikeekips/sebak/statuses/{sha}","languages_url":"https://api.github.com/repos/spikeekips/sebak/languages","stargazers_url":"https://api.github.com/repos/spikeekips/sebak/stargazers","contributors_url":"https://api.github.com/repos/spikeekips/sebak/contributors","subscribers_url":"https://api.github.com/repos/spikeekips/sebak/subscribers","subscription_url":"https://api.github.com/repos/spikeekips/sebak/subscription","commits_url":"https://api.github.com/repos/spikeekips/sebak/commits{/sha}","git_commits_url":"https://api.github.com/repos/spikeekips/sebak/git/commits{/sha}","comments_url":"https://api.github.com/repos/spikeekips/sebak/comments{/number}","issue_comment_url":"https://api.github.com/repos/spikeekips/sebak/issues/comments{/number}","contents_url":"https://api.github.com/repos/spikeekips/sebak/contents/{+path}","compare_url":"https://api.github.com/repos/spikeekips/sebak/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spikeekips/sebak/merges","archive_url":"https://api.github.com/repos/spikeekips/sebak/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spikeekips/sebak/downloads","issues_url":"https://api.github.com/repos/spikeekips/sebak/issues{/number}","pulls_url":"https://api.github.com/repos/spikeekips/sebak/pulls{/number}","milestones_url":"https://api.github.com/repos/spikeekips/sebak/milestones{/number}","notifications_url":"https://api.github.com/repos/spikeekips/sebak/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spikeekips/sebak/labels{/name}","releases_url":"https://api.github.com/repos/spikeekips/sebak/releases{/id}","deployments_url":"https://api.github.com/repos/spikeekips/sebak/deployments","created_at":"2018-06-14T05:35:40Z","updated_at":"2018-10-25T03:01:03Z","pushed_at":"2018-10-25T07:56:39Z","git_url":"git://github.com/spikeekips/sebak.git","ssh_url":"git@github.com:spikeekips/sebak.git","clone_url":"https://github.com/spikeekips/sebak.git","svn_url":"https://github.com/spikeekips/sebak","homepage":"https://boscoin.io","size":1756,"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":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bosnet:master","ref":"master","sha":"807c2c6825241555c292452d1f953b72dfd03eb8","user":{"login":"bosnet","id":37893578,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3ODkzNTc4","avatar_url":"https://avatars1.githubusercontent.com/u/37893578?v=4","gravatar_id":"","url":"https://api.github.com/users/bosnet","html_url":"https://github.com/bosnet","followers_url":"https://api.github.com/users/bosnet/followers","following_url":"https://api.github.com/users/bosnet/following{/other_user}","gists_url":"https://api.github.com/users/bosnet/gists{/gist_id}","starred_url":"https://api.github.com/users/bosnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bosnet/subscriptions","organizations_url":"https://api.github.com/users/bosnet/orgs","repos_url":"https://api.github.com/users/bosnet/repos","events_url":"https://api.github.com/users/bosnet/events{/privacy}","received_events_url":"https://api.github.com/users/bosnet/received_events","type":"Organization","site_admin":false},"repo":{"id":129848943,"node_id":"MDEwOlJlcG9zaXRvcnkxMjk4NDg5NDM=","name":"sebak","full_name":"bosnet/sebak","private":false,"owner":{"login":"bosnet","id":37893578,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3ODkzNTc4","avatar_url":"https://avatars1.githubusercontent.com/u/37893578?v=4","gravatar_id":"","url":"https://api.github.com/users/bosnet","html_url":"https://github.com/bosnet","followers_url":"https://api.github.com/users/bosnet/followers","following_url":"https://api.github.com/users/bosnet/following{/other_user}","gists_url":"https://api.github.com/users/bosnet/gists{/gist_id}","starred_url":"https://api.github.com/users/bosnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bosnet/subscriptions","organizations_url":"https://api.github.com/users/bosnet/orgs","repos_url":"https://api.github.com/users/bosnet/repos","events_url":"https://api.github.com/users/bosnet/events{/privacy}","received_events_url":"https://api.github.com/users/bosnet/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bosnet/sebak","description":"SEBAK, the next BOScoin Tokennet with ISAAC consensus protocol","fork":false,"url":"https://api.github.com/repos/bosnet/sebak","forks_url":"https://api.github.com/repos/bosnet/sebak/forks","keys_url":"https://api.github.com/repos/bosnet/sebak/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bosnet/sebak/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bosnet/sebak/teams","hooks_url":"https://api.github.com/repos/bosnet/sebak/hooks","issue_events_url":"https://api.github.com/repos/bosnet/sebak/issues/events{/number}","events_url":"https://api.github.com/repos/bosnet/sebak/events","assignees_url":"https://api.github.com/repos/bosnet/sebak/assignees{/user}","branches_url":"https://api.github.com/repos/bosnet/sebak/branches{/branch}","tags_url":"https://api.github.com/repos/bosnet/sebak/tags","blobs_url":"https://api.github.com/repos/bosnet/sebak/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bosnet/sebak/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bosnet/sebak/git/refs{/sha}","trees_url":"https://api.github.com/repos/bosnet/sebak/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bosnet/sebak/statuses/{sha}","languages_url":"https://api.github.com/repos/bosnet/sebak/languages","stargazers_url":"https://api.github.com/repos/bosnet/sebak/stargazers","contributors_url":"https://api.github.com/repos/bosnet/sebak/contributors","subscribers_url":"https://api.github.com/repos/bosnet/sebak/subscribers","subscription_url":"https://api.github.com/repos/bosnet/sebak/subscription","commits_url":"https://api.github.com/repos/bosnet/sebak/commits{/sha}","git_commits_url":"https://api.github.com/repos/bosnet/sebak/git/commits{/sha}","comments_url":"https://api.github.com/repos/bosnet/sebak/comments{/number}","issue_comment_url":"https://api.github.com/repos/bosnet/sebak/issues/comments{/number}","contents_url":"https://api.github.com/repos/bosnet/sebak/contents/{+path}","compare_url":"https://api.github.com/repos/bosnet/sebak/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bosnet/sebak/merges","archive_url":"https://api.github.com/repos/bosnet/sebak/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bosnet/sebak/downloads","issues_url":"https://api.github.com/repos/bosnet/sebak/issues{/number}","pulls_url":"https://api.github.com/repos/bosnet/sebak/pulls{/number}","milestones_url":"https://api.github.com/repos/bosnet/sebak/milestones{/number}","notifications_url":"https://api.github.com/repos/bosnet/sebak/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bosnet/sebak/labels{/name}","releases_url":"https://api.github.com/repos/bosnet/sebak/releases{/id}","deployments_url":"https://api.github.com/repos/bosnet/sebak/deployments","created_at":"2018-04-17T05:05:34Z","updated_at":"2018-10-25T07:50:53Z","pushed_at":"2018-10-25T07:58:08Z","git_url":"git://github.com/bosnet/sebak.git","ssh_url":"git@github.com:bosnet/sebak.git","clone_url":"https://github.com/bosnet/sebak.git","svn_url":"https://github.com/bosnet/sebak","homepage":"https://bosnet.github.io/sebak/","size":1508,"stargazers_count":36,"watchers_count":36,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":79,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":15,"open_issues":79,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bosnet/sebak/pulls/604"},"html":{"href":"https://github.com/bosnet/sebak/pull/604"},"issue":{"href":"https://api.github.com/repos/bosnet/sebak/issues/604"},"comments":{"href":"https://api.github.com/repos/bosnet/sebak/issues/604/comments"},"review_comments":{"href":"https://api.github.com/repos/bosnet/sebak/pulls/604/comments"},"review_comment":{"href":"https://api.github.com/repos/bosnet/sebak/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bosnet/sebak/pulls/604/commits"},"statuses":{"href":"https://api.github.com/repos/bosnet/sebak/statuses/cb1aca27ffab51472c6cafc5ce99657d9604ce45"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"Geod24"}}