{"action":"created","comment":{"url":"https://api.github.com/repos/amphp/http-server/pulls/comments/174150722","pull_request_review_id":103453416,"id":174150722,"diff_hunk":"@@ -86,7 +91,12 @@ public function addHeader(string $name, $value) {\n         \\assert($this->isNameValid($name), \"Invalid header name\");\n \n         if (\\is_array($value)) {\n-            $value = \\array_map(\"strval\", $value);\n+            if (!$value) {\n+                $this->removeHeader($name);","path":"src/Message.php","position":6,"original_position":20,"commit_id":"d75b64b5de5501ad16b3a2cd8f57fe08bb89274d","original_commit_id":"d75b64b5de5501ad16b3a2cd8f57fe08bb89274d","user":{"login":"trowski","id":1628287,"avatar_url":"https://avatars3.githubusercontent.com/u/1628287?v=4","gravatar_id":"","url":"https://api.github.com/users/trowski","html_url":"https://github.com/trowski","followers_url":"https://api.github.com/users/trowski/followers","following_url":"https://api.github.com/users/trowski/following{/other_user}","gists_url":"https://api.github.com/users/trowski/gists{/gist_id}","starred_url":"https://api.github.com/users/trowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trowski/subscriptions","organizations_url":"https://api.github.com/users/trowski/orgs","repos_url":"https://api.github.com/users/trowski/repos","events_url":"https://api.github.com/users/trowski/events{/privacy}","received_events_url":"https://api.github.com/users/trowski/received_events","type":"User","site_admin":false},"body":"The header should not be removed from this method, this should just `return`.","created_at":"2018-03-13T14:28:25Z","updated_at":"2018-03-13T14:28:25Z","html_url":"https://github.com/amphp/http-server/pull/231#discussion_r174150722","pull_request_url":"https://api.github.com/repos/amphp/http-server/pulls/231","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/amphp/http-server/pulls/comments/174150722"},"html":{"href":"https://github.com/amphp/http-server/pull/231#discussion_r174150722"},"pull_request":{"href":"https://api.github.com/repos/amphp/http-server/pulls/231"}}},"pull_request":{"url":"https://api.github.com/repos/amphp/http-server/pulls/231","id":174668890,"html_url":"https://github.com/amphp/http-server/pull/231","diff_url":"https://github.com/amphp/http-server/pull/231.diff","patch_url":"https://github.com/amphp/http-server/pull/231.patch","issue_url":"https://api.github.com/repos/amphp/http-server/issues/231","number":231,"state":"closed","locked":false,"title":"Prevent empty header arrays","user":{"login":"ekinhbayar","id":6135846,"avatar_url":"https://avatars2.githubusercontent.com/u/6135846?v=4","gravatar_id":"","url":"https://api.github.com/users/ekinhbayar","html_url":"https://github.com/ekinhbayar","followers_url":"https://api.github.com/users/ekinhbayar/followers","following_url":"https://api.github.com/users/ekinhbayar/following{/other_user}","gists_url":"https://api.github.com/users/ekinhbayar/gists{/gist_id}","starred_url":"https://api.github.com/users/ekinhbayar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekinhbayar/subscriptions","organizations_url":"https://api.github.com/users/ekinhbayar/orgs","repos_url":"https://api.github.com/users/ekinhbayar/repos","events_url":"https://api.github.com/users/ekinhbayar/events{/privacy}","received_events_url":"https://api.github.com/users/ekinhbayar/received_events","type":"User","site_admin":false},"body":"Fixes #230 ","created_at":"2018-03-13T14:00:55Z","updated_at":"2018-03-13T14:28:25Z","closed_at":"2018-03-13T14:16:20Z","merged_at":"2018-03-13T14:16:20Z","merge_commit_sha":"9c3a75dd905274c14beb4c36cb1677679cf3489c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/amphp/http-server/pulls/231/commits","review_comments_url":"https://api.github.com/repos/amphp/http-server/pulls/231/comments","review_comment_url":"https://api.github.com/repos/amphp/http-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amphp/http-server/issues/231/comments","statuses_url":"https://api.github.com/repos/amphp/http-server/statuses/d75b64b5de5501ad16b3a2cd8f57fe08bb89274d","head":{"label":"ekinhbayar:empty_arrays","ref":"empty_arrays","sha":"d75b64b5de5501ad16b3a2cd8f57fe08bb89274d","user":{"login":"ekinhbayar","id":6135846,"avatar_url":"https://avatars2.githubusercontent.com/u/6135846?v=4","gravatar_id":"","url":"https://api.github.com/users/ekinhbayar","html_url":"https://github.com/ekinhbayar","followers_url":"https://api.github.com/users/ekinhbayar/followers","following_url":"https://api.github.com/users/ekinhbayar/following{/other_user}","gists_url":"https://api.github.com/users/ekinhbayar/gists{/gist_id}","starred_url":"https://api.github.com/users/ekinhbayar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekinhbayar/subscriptions","organizations_url":"https://api.github.com/users/ekinhbayar/orgs","repos_url":"https://api.github.com/users/ekinhbayar/repos","events_url":"https://api.github.com/users/ekinhbayar/events{/privacy}","received_events_url":"https://api.github.com/users/ekinhbayar/received_events","type":"User","site_admin":false},"repo":{"id":125037405,"name":"http-server","full_name":"ekinhbayar/http-server","owner":{"login":"ekinhbayar","id":6135846,"avatar_url":"https://avatars2.githubusercontent.com/u/6135846?v=4","gravatar_id":"","url":"https://api.github.com/users/ekinhbayar","html_url":"https://github.com/ekinhbayar","followers_url":"https://api.github.com/users/ekinhbayar/followers","following_url":"https://api.github.com/users/ekinhbayar/following{/other_user}","gists_url":"https://api.github.com/users/ekinhbayar/gists{/gist_id}","starred_url":"https://api.github.com/users/ekinhbayar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekinhbayar/subscriptions","organizations_url":"https://api.github.com/users/ekinhbayar/orgs","repos_url":"https://api.github.com/users/ekinhbayar/repos","events_url":"https://api.github.com/users/ekinhbayar/events{/privacy}","received_events_url":"https://api.github.com/users/ekinhbayar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ekinhbayar/http-server","description":"A non-blocking HTTP application server for PHP based on Amp.","fork":true,"url":"https://api.github.com/repos/ekinhbayar/http-server","forks_url":"https://api.github.com/repos/ekinhbayar/http-server/forks","keys_url":"https://api.github.com/repos/ekinhbayar/http-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ekinhbayar/http-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ekinhbayar/http-server/teams","hooks_url":"https://api.github.com/repos/ekinhbayar/http-server/hooks","issue_events_url":"https://api.github.com/repos/ekinhbayar/http-server/issues/events{/number}","events_url":"https://api.github.com/repos/ekinhbayar/http-server/events","assignees_url":"https://api.github.com/repos/ekinhbayar/http-server/assignees{/user}","branches_url":"https://api.github.com/repos/ekinhbayar/http-server/branches{/branch}","tags_url":"https://api.github.com/repos/ekinhbayar/http-server/tags","blobs_url":"https://api.github.com/repos/ekinhbayar/http-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ekinhbayar/http-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ekinhbayar/http-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/ekinhbayar/http-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ekinhbayar/http-server/statuses/{sha}","languages_url":"https://api.github.com/repos/ekinhbayar/http-server/languages","stargazers_url":"https://api.github.com/repos/ekinhbayar/http-server/stargazers","contributors_url":"https://api.github.com/repos/ekinhbayar/http-server/contributors","subscribers_url":"https://api.github.com/repos/ekinhbayar/http-server/subscribers","subscription_url":"https://api.github.com/repos/ekinhbayar/http-server/subscription","commits_url":"https://api.github.com/repos/ekinhbayar/http-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/ekinhbayar/http-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/ekinhbayar/http-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/ekinhbayar/http-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/ekinhbayar/http-server/contents/{+path}","compare_url":"https://api.github.com/repos/ekinhbayar/http-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ekinhbayar/http-server/merges","archive_url":"https://api.github.com/repos/ekinhbayar/http-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ekinhbayar/http-server/downloads","issues_url":"https://api.github.com/repos/ekinhbayar/http-server/issues{/number}","pulls_url":"https://api.github.com/repos/ekinhbayar/http-server/pulls{/number}","milestones_url":"https://api.github.com/repos/ekinhbayar/http-server/milestones{/number}","notifications_url":"https://api.github.com/repos/ekinhbayar/http-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ekinhbayar/http-server/labels{/name}","releases_url":"https://api.github.com/repos/ekinhbayar/http-server/releases{/id}","deployments_url":"https://api.github.com/repos/ekinhbayar/http-server/deployments","created_at":"2018-03-13T10:58:08Z","updated_at":"2018-03-13T10:58:10Z","pushed_at":"2018-03-13T14:12:12Z","git_url":"git://github.com/ekinhbayar/http-server.git","ssh_url":"git@github.com:ekinhbayar/http-server.git","clone_url":"https://github.com/ekinhbayar/http-server.git","svn_url":"https://github.com/ekinhbayar/http-server","homepage":"https://amphp.org/http-server","size":13580,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"amphp:master","ref":"master","sha":"f393b0f88aa3ccb3d3936dae3c82e9ee14476341","user":{"login":"amphp","id":8865682,"avatar_url":"https://avatars3.githubusercontent.com/u/8865682?v=4","gravatar_id":"","url":"https://api.github.com/users/amphp","html_url":"https://github.com/amphp","followers_url":"https://api.github.com/users/amphp/followers","following_url":"https://api.github.com/users/amphp/following{/other_user}","gists_url":"https://api.github.com/users/amphp/gists{/gist_id}","starred_url":"https://api.github.com/users/amphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amphp/subscriptions","organizations_url":"https://api.github.com/users/amphp/orgs","repos_url":"https://api.github.com/users/amphp/repos","events_url":"https://api.github.com/users/amphp/events{/privacy}","received_events_url":"https://api.github.com/users/amphp/received_events","type":"Organization","site_admin":false},"repo":{"id":7905923,"name":"http-server","full_name":"amphp/http-server","owner":{"login":"amphp","id":8865682,"avatar_url":"https://avatars3.githubusercontent.com/u/8865682?v=4","gravatar_id":"","url":"https://api.github.com/users/amphp","html_url":"https://github.com/amphp","followers_url":"https://api.github.com/users/amphp/followers","following_url":"https://api.github.com/users/amphp/following{/other_user}","gists_url":"https://api.github.com/users/amphp/gists{/gist_id}","starred_url":"https://api.github.com/users/amphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amphp/subscriptions","organizations_url":"https://api.github.com/users/amphp/orgs","repos_url":"https://api.github.com/users/amphp/repos","events_url":"https://api.github.com/users/amphp/events{/privacy}","received_events_url":"https://api.github.com/users/amphp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amphp/http-server","description":"A non-blocking HTTP application server for PHP based on Amp.","fork":false,"url":"https://api.github.com/repos/amphp/http-server","forks_url":"https://api.github.com/repos/amphp/http-server/forks","keys_url":"https://api.github.com/repos/amphp/http-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amphp/http-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amphp/http-server/teams","hooks_url":"https://api.github.com/repos/amphp/http-server/hooks","issue_events_url":"https://api.github.com/repos/amphp/http-server/issues/events{/number}","events_url":"https://api.github.com/repos/amphp/http-server/events","assignees_url":"https://api.github.com/repos/amphp/http-server/assignees{/user}","branches_url":"https://api.github.com/repos/amphp/http-server/branches{/branch}","tags_url":"https://api.github.com/repos/amphp/http-server/tags","blobs_url":"https://api.github.com/repos/amphp/http-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amphp/http-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amphp/http-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/amphp/http-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amphp/http-server/statuses/{sha}","languages_url":"https://api.github.com/repos/amphp/http-server/languages","stargazers_url":"https://api.github.com/repos/amphp/http-server/stargazers","contributors_url":"https://api.github.com/repos/amphp/http-server/contributors","subscribers_url":"https://api.github.com/repos/amphp/http-server/subscribers","subscription_url":"https://api.github.com/repos/amphp/http-server/subscription","commits_url":"https://api.github.com/repos/amphp/http-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/amphp/http-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/amphp/http-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/amphp/http-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/amphp/http-server/contents/{+path}","compare_url":"https://api.github.com/repos/amphp/http-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amphp/http-server/merges","archive_url":"https://api.github.com/repos/amphp/http-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amphp/http-server/downloads","issues_url":"https://api.github.com/repos/amphp/http-server/issues{/number}","pulls_url":"https://api.github.com/repos/amphp/http-server/pulls{/number}","milestones_url":"https://api.github.com/repos/amphp/http-server/milestones{/number}","notifications_url":"https://api.github.com/repos/amphp/http-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amphp/http-server/labels{/name}","releases_url":"https://api.github.com/repos/amphp/http-server/releases{/id}","deployments_url":"https://api.github.com/repos/amphp/http-server/deployments","created_at":"2013-01-30T02:05:18Z","updated_at":"2018-03-13T14:26:20Z","pushed_at":"2018-03-13T14:16:20Z","git_url":"git://github.com/amphp/http-server.git","ssh_url":"git@github.com:amphp/http-server.git","clone_url":"https://github.com/amphp/http-server.git","svn_url":"https://github.com/amphp/http-server","homepage":"https://amphp.org/http-server","size":13588,"stargazers_count":840,"watchers_count":840,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":55,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":55,"open_issues":10,"watchers":840,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amphp/http-server/pulls/231"},"html":{"href":"https://github.com/amphp/http-server/pull/231"},"issue":{"href":"https://api.github.com/repos/amphp/http-server/issues/231"},"comments":{"href":"https://api.github.com/repos/amphp/http-server/issues/231/comments"},"review_comments":{"href":"https://api.github.com/repos/amphp/http-server/pulls/231/comments"},"review_comment":{"href":"https://api.github.com/repos/amphp/http-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amphp/http-server/pulls/231/commits"},"statuses":{"href":"https://api.github.com/repos/amphp/http-server/statuses/d75b64b5de5501ad16b3a2cd8f57fe08bb89274d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"trowski"}}