{"action":"created","comment":{"url":"https://api.github.com/repos/cbothner/react-activestorage-provider/pulls/comments/244880437","pull_request_review_id":188861164,"id":244880437,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NDg4MDQzNw==","diff_hunk":"@@ -58,26 +58,34 @@ class ActiveStorageProvider extends React.Component<Props> {\n     }\n   }\n \n+  _getHeaders = (): CustomHeaders => {\n+    // fastest performance for indifferent access: https://jsperf.com/downcase-and-merge-object-keys\n+    const mappedHeaders = {}, { headers = {} } = this.props\n+    try {\n+      Object.keys(headers || {}).reduce((c, k) => (c[k.toLowerCase()] = headers[k], c), mappedHeaders)\n+    } catch { /* ignore invalid headers */ }","path":"src/index.js","position":9,"original_position":9,"commit_id":"0c8d4b46dbe9ee0cf84af1857cd4f80eae6d7c24","original_commit_id":"0c8d4b46dbe9ee0cf84af1857cd4f80eae6d7c24","user":{"login":"SampsonCrowley","id":22461638,"node_id":"MDQ6VXNlcjIyNDYxNjM4","avatar_url":"https://avatars1.githubusercontent.com/u/22461638?v=4","gravatar_id":"","url":"https://api.github.com/users/SampsonCrowley","html_url":"https://github.com/SampsonCrowley","followers_url":"https://api.github.com/users/SampsonCrowley/followers","following_url":"https://api.github.com/users/SampsonCrowley/following{/other_user}","gists_url":"https://api.github.com/users/SampsonCrowley/gists{/gist_id}","starred_url":"https://api.github.com/users/SampsonCrowley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SampsonCrowley/subscriptions","organizations_url":"https://api.github.com/users/SampsonCrowley/orgs","repos_url":"https://api.github.com/users/SampsonCrowley/repos","events_url":"https://api.github.com/users/SampsonCrowley/events{/privacy}","received_events_url":"https://api.github.com/users/SampsonCrowley/received_events","type":"User","site_admin":false},"body":"though looking at it now, I realize that the `try...catch` block should be moved into the reducer, not as a wrapper","created_at":"2019-01-02T23:03:49Z","updated_at":"2019-01-02T23:03:49Z","html_url":"https://github.com/cbothner/react-activestorage-provider/pull/17#discussion_r244880437","pull_request_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/pulls/17","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/cbothner/react-activestorage-provider/pulls/comments/244880437"},"html":{"href":"https://github.com/cbothner/react-activestorage-provider/pull/17#discussion_r244880437"},"pull_request":{"href":"https://api.github.com/repos/cbothner/react-activestorage-provider/pulls/17"}},"in_reply_to_id":244862352},"pull_request":{"url":"https://api.github.com/repos/cbothner/react-activestorage-provider/pulls/17","id":241056093,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxMDU2MDkz","html_url":"https://github.com/cbothner/react-activestorage-provider/pull/17","diff_url":"https://github.com/cbothner/react-activestorage-provider/pull/17.diff","patch_url":"https://github.com/cbothner/react-activestorage-provider/pull/17.patch","issue_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/issues/17","number":17,"state":"open","locked":false,"title":"remove error when CSRF token not present","user":{"login":"SampsonCrowley","id":22461638,"node_id":"MDQ6VXNlcjIyNDYxNjM4","avatar_url":"https://avatars1.githubusercontent.com/u/22461638?v=4","gravatar_id":"","url":"https://api.github.com/users/SampsonCrowley","html_url":"https://github.com/SampsonCrowley","followers_url":"https://api.github.com/users/SampsonCrowley/followers","following_url":"https://api.github.com/users/SampsonCrowley/following{/other_user}","gists_url":"https://api.github.com/users/SampsonCrowley/gists{/gist_id}","starred_url":"https://api.github.com/users/SampsonCrowley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SampsonCrowley/subscriptions","organizations_url":"https://api.github.com/users/SampsonCrowley/orgs","repos_url":"https://api.github.com/users/SampsonCrowley/repos","events_url":"https://api.github.com/users/SampsonCrowley/events{/privacy}","received_events_url":"https://api.github.com/users/SampsonCrowley/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-27T01:15:58Z","updated_at":"2019-01-02T23:03:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a2811eb1419fe31b1a6bab775554f379c0f731f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/pulls/17/commits","review_comments_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/pulls/17/comments","review_comment_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/issues/17/comments","statuses_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/statuses/0c8d4b46dbe9ee0cf84af1857cd4f80eae6d7c24","head":{"label":"SampsonCrowley:master","ref":"master","sha":"0c8d4b46dbe9ee0cf84af1857cd4f80eae6d7c24","user":{"login":"SampsonCrowley","id":22461638,"node_id":"MDQ6VXNlcjIyNDYxNjM4","avatar_url":"https://avatars1.githubusercontent.com/u/22461638?v=4","gravatar_id":"","url":"https://api.github.com/users/SampsonCrowley","html_url":"https://github.com/SampsonCrowley","followers_url":"https://api.github.com/users/SampsonCrowley/followers","following_url":"https://api.github.com/users/SampsonCrowley/following{/other_user}","gists_url":"https://api.github.com/users/SampsonCrowley/gists{/gist_id}","starred_url":"https://api.github.com/users/SampsonCrowley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SampsonCrowley/subscriptions","organizations_url":"https://api.github.com/users/SampsonCrowley/orgs","repos_url":"https://api.github.com/users/SampsonCrowley/repos","events_url":"https://api.github.com/users/SampsonCrowley/events{/privacy}","received_events_url":"https://api.github.com/users/SampsonCrowley/received_events","type":"User","site_admin":false},"repo":{"id":163229380,"node_id":"MDEwOlJlcG9zaXRvcnkxNjMyMjkzODA=","name":"react-activestorage-provider","full_name":"SampsonCrowley/react-activestorage-provider","private":false,"owner":{"login":"SampsonCrowley","id":22461638,"node_id":"MDQ6VXNlcjIyNDYxNjM4","avatar_url":"https://avatars1.githubusercontent.com/u/22461638?v=4","gravatar_id":"","url":"https://api.github.com/users/SampsonCrowley","html_url":"https://github.com/SampsonCrowley","followers_url":"https://api.github.com/users/SampsonCrowley/followers","following_url":"https://api.github.com/users/SampsonCrowley/following{/other_user}","gists_url":"https://api.github.com/users/SampsonCrowley/gists{/gist_id}","starred_url":"https://api.github.com/users/SampsonCrowley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SampsonCrowley/subscriptions","organizations_url":"https://api.github.com/users/SampsonCrowley/orgs","repos_url":"https://api.github.com/users/SampsonCrowley/repos","events_url":"https://api.github.com/users/SampsonCrowley/events{/privacy}","received_events_url":"https://api.github.com/users/SampsonCrowley/received_events","type":"User","site_admin":false},"html_url":"https://github.com/SampsonCrowley/react-activestorage-provider","description":"A React component that allows easy file upload using ActiveStorage","fork":true,"url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider","forks_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/forks","keys_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/teams","hooks_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/hooks","issue_events_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/issues/events{/number}","events_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/events","assignees_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/assignees{/user}","branches_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/branches{/branch}","tags_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/tags","blobs_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/git/refs{/sha}","trees_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/statuses/{sha}","languages_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/languages","stargazers_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/stargazers","contributors_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/contributors","subscribers_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/subscribers","subscription_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/subscription","commits_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/commits{/sha}","git_commits_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/git/commits{/sha}","comments_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/comments{/number}","issue_comment_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/issues/comments{/number}","contents_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/contents/{+path}","compare_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/merges","archive_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/downloads","issues_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/issues{/number}","pulls_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/pulls{/number}","milestones_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/milestones{/number}","notifications_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/labels{/name}","releases_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/releases{/id}","deployments_url":"https://api.github.com/repos/SampsonCrowley/react-activestorage-provider/deployments","created_at":"2018-12-27T00:44:12Z","updated_at":"2019-01-02T19:25:00Z","pushed_at":"2019-01-02T19:24:58Z","git_url":"git://github.com/SampsonCrowley/react-activestorage-provider.git","ssh_url":"git@github.com:SampsonCrowley/react-activestorage-provider.git","clone_url":"https://github.com/SampsonCrowley/react-activestorage-provider.git","svn_url":"https://github.com/SampsonCrowley/react-activestorage-provider","homepage":null,"size":219,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cbothner:master","ref":"master","sha":"44b4d85d4cae407679f6510fcc36050ba3427146","user":{"login":"cbothner","id":4642599,"node_id":"MDQ6VXNlcjQ2NDI1OTk=","avatar_url":"https://avatars1.githubusercontent.com/u/4642599?v=4","gravatar_id":"","url":"https://api.github.com/users/cbothner","html_url":"https://github.com/cbothner","followers_url":"https://api.github.com/users/cbothner/followers","following_url":"https://api.github.com/users/cbothner/following{/other_user}","gists_url":"https://api.github.com/users/cbothner/gists{/gist_id}","starred_url":"https://api.github.com/users/cbothner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbothner/subscriptions","organizations_url":"https://api.github.com/users/cbothner/orgs","repos_url":"https://api.github.com/users/cbothner/repos","events_url":"https://api.github.com/users/cbothner/events{/privacy}","received_events_url":"https://api.github.com/users/cbothner/received_events","type":"User","site_admin":false},"repo":{"id":120817192,"node_id":"MDEwOlJlcG9zaXRvcnkxMjA4MTcxOTI=","name":"react-activestorage-provider","full_name":"cbothner/react-activestorage-provider","private":false,"owner":{"login":"cbothner","id":4642599,"node_id":"MDQ6VXNlcjQ2NDI1OTk=","avatar_url":"https://avatars1.githubusercontent.com/u/4642599?v=4","gravatar_id":"","url":"https://api.github.com/users/cbothner","html_url":"https://github.com/cbothner","followers_url":"https://api.github.com/users/cbothner/followers","following_url":"https://api.github.com/users/cbothner/following{/other_user}","gists_url":"https://api.github.com/users/cbothner/gists{/gist_id}","starred_url":"https://api.github.com/users/cbothner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbothner/subscriptions","organizations_url":"https://api.github.com/users/cbothner/orgs","repos_url":"https://api.github.com/users/cbothner/repos","events_url":"https://api.github.com/users/cbothner/events{/privacy}","received_events_url":"https://api.github.com/users/cbothner/received_events","type":"User","site_admin":false},"html_url":"https://github.com/cbothner/react-activestorage-provider","description":"A React component that allows easy file upload using ActiveStorage","fork":false,"url":"https://api.github.com/repos/cbothner/react-activestorage-provider","forks_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/forks","keys_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/teams","hooks_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/hooks","issue_events_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/issues/events{/number}","events_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/events","assignees_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/assignees{/user}","branches_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/branches{/branch}","tags_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/tags","blobs_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/git/refs{/sha}","trees_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/statuses/{sha}","languages_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/languages","stargazers_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/stargazers","contributors_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/contributors","subscribers_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/subscribers","subscription_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/subscription","commits_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/commits{/sha}","git_commits_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/git/commits{/sha}","comments_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/comments{/number}","issue_comment_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/issues/comments{/number}","contents_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/contents/{+path}","compare_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/merges","archive_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/downloads","issues_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/issues{/number}","pulls_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/pulls{/number}","milestones_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/milestones{/number}","notifications_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/labels{/name}","releases_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/releases{/id}","deployments_url":"https://api.github.com/repos/cbothner/react-activestorage-provider/deployments","created_at":"2018-02-08T20:58:14Z","updated_at":"2019-01-02T01:03:47Z","pushed_at":"2019-01-02T19:24:59Z","git_url":"git://github.com/cbothner/react-activestorage-provider.git","ssh_url":"git@github.com:cbothner/react-activestorage-provider.git","clone_url":"https://github.com/cbothner/react-activestorage-provider.git","svn_url":"https://github.com/cbothner/react-activestorage-provider","homepage":null,"size":217,"stargazers_count":37,"watchers_count":37,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":10,"open_issues":2,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cbothner/react-activestorage-provider/pulls/17"},"html":{"href":"https://github.com/cbothner/react-activestorage-provider/pull/17"},"issue":{"href":"https://api.github.com/repos/cbothner/react-activestorage-provider/issues/17"},"comments":{"href":"https://api.github.com/repos/cbothner/react-activestorage-provider/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/cbothner/react-activestorage-provider/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/cbothner/react-activestorage-provider/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cbothner/react-activestorage-provider/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/cbothner/react-activestorage-provider/statuses/0c8d4b46dbe9ee0cf84af1857cd4f80eae6d7c24"}},"author_association":"NONE"}}
{"actor":{"display_login":"SampsonCrowley"}}