{"action":"created","comment":{"url":"https://api.github.com/repos/github/fetch/pulls/comments/91087064","pull_request_review_id":11596743,"id":91087064,"diff_hunk":"@@ -355,7 +355,7 @@\n \n   function parseHeaders(rawHeaders) {\n     var headers = new Headers()\n-    rawHeaders.split('\\r\\n').forEach(function(line) {\n+    rawHeaders.replace('\\r\\n', '\\n').split('\\n').forEach(function(line) {","path":"fetch.js","position":5,"original_position":5,"commit_id":"959eb056a1cf08b28e9f9efb1ce57186fce1213d","original_commit_id":"959eb056a1cf08b28e9f9efb1ce57186fce1213d","user":{"login":"mislav","id":887,"avatar_url":"https://avatars.githubusercontent.com/u/887?v=3","gravatar_id":"","url":"https://api.github.com/users/mislav","html_url":"https://github.com/mislav","followers_url":"https://api.github.com/users/mislav/followers","following_url":"https://api.github.com/users/mislav/following{/other_user}","gists_url":"https://api.github.com/users/mislav/gists{/gist_id}","starred_url":"https://api.github.com/users/mislav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mislav/subscriptions","organizations_url":"https://api.github.com/users/mislav/orgs","repos_url":"https://api.github.com/users/mislav/repos","events_url":"https://api.github.com/users/mislav/events{/privacy}","received_events_url":"https://api.github.com/users/mislav/received_events","type":"User","site_admin":true},"body":"Would this work as simply `split(/\\r?\\n/)` to avoid the replace?","created_at":"2016-12-06T14:26:11Z","updated_at":"2016-12-06T14:26:30Z","html_url":"https://github.com/github/fetch/pull/449#discussion_r91087064","pull_request_url":"https://api.github.com/repos/github/fetch/pulls/449","_links":{"self":{"href":"https://api.github.com/repos/github/fetch/pulls/comments/91087064"},"html":{"href":"https://github.com/github/fetch/pull/449#discussion_r91087064"},"pull_request":{"href":"https://api.github.com/repos/github/fetch/pulls/449"}}},"pull_request":{"url":"https://api.github.com/repos/github/fetch/pulls/449","id":96617658,"html_url":"https://github.com/github/fetch/pull/449","diff_url":"https://github.com/github/fetch/pull/449.diff","patch_url":"https://github.com/github/fetch/pull/449.patch","issue_url":"https://api.github.com/repos/github/fetch/issues/449","number":449,"state":"open","locked":false,"title":"Support Tolerance Provision when parsing headers","user":{"login":"woudini","id":10579422,"avatar_url":"https://avatars.githubusercontent.com/u/10579422?v=3","gravatar_id":"","url":"https://api.github.com/users/woudini","html_url":"https://github.com/woudini","followers_url":"https://api.github.com/users/woudini/followers","following_url":"https://api.github.com/users/woudini/following{/other_user}","gists_url":"https://api.github.com/users/woudini/gists{/gist_id}","starred_url":"https://api.github.com/users/woudini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woudini/subscriptions","organizations_url":"https://api.github.com/users/woudini/orgs","repos_url":"https://api.github.com/users/woudini/repos","events_url":"https://api.github.com/users/woudini/events{/privacy}","received_events_url":"https://api.github.com/users/woudini/received_events","type":"User","site_admin":false},"body":"The change to fix this issue https://github.com/github/fetch/issues/422 has created another issue for our app on devices running iOS 8.2 and iOS 9. The impact prevents these users from using our app entirely.\r\n\r\nMore specifically, the result of splitting by `\\r\\n` and not both `\\r\\n` and `\\n` is a malformed response header with all the actual headers put into the 'pragma' key and a content type of `text/plain;charset=UTF-8` instead of `application/json`.\r\n\r\nSource:\r\nhttp://stackoverflow.com/a/5757349\r\nmore specifically, https://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.3","created_at":"2016-12-05T21:58:39Z","updated_at":"2016-12-06T14:26:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2df5b9c3db4b779a09f1b676d058fbba6c31a4ae","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/github/fetch/pulls/449/commits","review_comments_url":"https://api.github.com/repos/github/fetch/pulls/449/comments","review_comment_url":"https://api.github.com/repos/github/fetch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/github/fetch/issues/449/comments","statuses_url":"https://api.github.com/repos/github/fetch/statuses/959eb056a1cf08b28e9f9efb1ce57186fce1213d","head":{"label":"woudini:tolerance-provision","ref":"tolerance-provision","sha":"959eb056a1cf08b28e9f9efb1ce57186fce1213d","user":{"login":"woudini","id":10579422,"avatar_url":"https://avatars.githubusercontent.com/u/10579422?v=3","gravatar_id":"","url":"https://api.github.com/users/woudini","html_url":"https://github.com/woudini","followers_url":"https://api.github.com/users/woudini/followers","following_url":"https://api.github.com/users/woudini/following{/other_user}","gists_url":"https://api.github.com/users/woudini/gists{/gist_id}","starred_url":"https://api.github.com/users/woudini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woudini/subscriptions","organizations_url":"https://api.github.com/users/woudini/orgs","repos_url":"https://api.github.com/users/woudini/repos","events_url":"https://api.github.com/users/woudini/events{/privacy}","received_events_url":"https://api.github.com/users/woudini/received_events","type":"User","site_admin":false},"repo":{"id":75669452,"name":"fetch","full_name":"woudini/fetch","owner":{"login":"woudini","id":10579422,"avatar_url":"https://avatars.githubusercontent.com/u/10579422?v=3","gravatar_id":"","url":"https://api.github.com/users/woudini","html_url":"https://github.com/woudini","followers_url":"https://api.github.com/users/woudini/followers","following_url":"https://api.github.com/users/woudini/following{/other_user}","gists_url":"https://api.github.com/users/woudini/gists{/gist_id}","starred_url":"https://api.github.com/users/woudini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woudini/subscriptions","organizations_url":"https://api.github.com/users/woudini/orgs","repos_url":"https://api.github.com/users/woudini/repos","events_url":"https://api.github.com/users/woudini/events{/privacy}","received_events_url":"https://api.github.com/users/woudini/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/woudini/fetch","description":"A window.fetch JavaScript polyfill.","fork":true,"url":"https://api.github.com/repos/woudini/fetch","forks_url":"https://api.github.com/repos/woudini/fetch/forks","keys_url":"https://api.github.com/repos/woudini/fetch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/woudini/fetch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/woudini/fetch/teams","hooks_url":"https://api.github.com/repos/woudini/fetch/hooks","issue_events_url":"https://api.github.com/repos/woudini/fetch/issues/events{/number}","events_url":"https://api.github.com/repos/woudini/fetch/events","assignees_url":"https://api.github.com/repos/woudini/fetch/assignees{/user}","branches_url":"https://api.github.com/repos/woudini/fetch/branches{/branch}","tags_url":"https://api.github.com/repos/woudini/fetch/tags","blobs_url":"https://api.github.com/repos/woudini/fetch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/woudini/fetch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/woudini/fetch/git/refs{/sha}","trees_url":"https://api.github.com/repos/woudini/fetch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/woudini/fetch/statuses/{sha}","languages_url":"https://api.github.com/repos/woudini/fetch/languages","stargazers_url":"https://api.github.com/repos/woudini/fetch/stargazers","contributors_url":"https://api.github.com/repos/woudini/fetch/contributors","subscribers_url":"https://api.github.com/repos/woudini/fetch/subscribers","subscription_url":"https://api.github.com/repos/woudini/fetch/subscription","commits_url":"https://api.github.com/repos/woudini/fetch/commits{/sha}","git_commits_url":"https://api.github.com/repos/woudini/fetch/git/commits{/sha}","comments_url":"https://api.github.com/repos/woudini/fetch/comments{/number}","issue_comment_url":"https://api.github.com/repos/woudini/fetch/issues/comments{/number}","contents_url":"https://api.github.com/repos/woudini/fetch/contents/{+path}","compare_url":"https://api.github.com/repos/woudini/fetch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/woudini/fetch/merges","archive_url":"https://api.github.com/repos/woudini/fetch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/woudini/fetch/downloads","issues_url":"https://api.github.com/repos/woudini/fetch/issues{/number}","pulls_url":"https://api.github.com/repos/woudini/fetch/pulls{/number}","milestones_url":"https://api.github.com/repos/woudini/fetch/milestones{/number}","notifications_url":"https://api.github.com/repos/woudini/fetch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/woudini/fetch/labels{/name}","releases_url":"https://api.github.com/repos/woudini/fetch/releases{/id}","deployments_url":"https://api.github.com/repos/woudini/fetch/deployments","created_at":"2016-12-05T21:49:54Z","updated_at":"2016-12-05T21:49:55Z","pushed_at":"2016-12-06T14:08:01Z","git_url":"git://github.com/woudini/fetch.git","ssh_url":"git@github.com:woudini/fetch.git","clone_url":"https://github.com/woudini/fetch.git","svn_url":"https://github.com/woudini/fetch","homepage":"http://github.github.io/fetch/","size":367,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"github:master","ref":"master","sha":"ccea05db365ecbc320da22a07ad6c9b01c861b95","user":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"repo":{"id":25136308,"name":"fetch","full_name":"github/fetch","owner":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/github/fetch","description":"A window.fetch JavaScript polyfill.","fork":false,"url":"https://api.github.com/repos/github/fetch","forks_url":"https://api.github.com/repos/github/fetch/forks","keys_url":"https://api.github.com/repos/github/fetch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/github/fetch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/github/fetch/teams","hooks_url":"https://api.github.com/repos/github/fetch/hooks","issue_events_url":"https://api.github.com/repos/github/fetch/issues/events{/number}","events_url":"https://api.github.com/repos/github/fetch/events","assignees_url":"https://api.github.com/repos/github/fetch/assignees{/user}","branches_url":"https://api.github.com/repos/github/fetch/branches{/branch}","tags_url":"https://api.github.com/repos/github/fetch/tags","blobs_url":"https://api.github.com/repos/github/fetch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/github/fetch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/github/fetch/git/refs{/sha}","trees_url":"https://api.github.com/repos/github/fetch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/github/fetch/statuses/{sha}","languages_url":"https://api.github.com/repos/github/fetch/languages","stargazers_url":"https://api.github.com/repos/github/fetch/stargazers","contributors_url":"https://api.github.com/repos/github/fetch/contributors","subscribers_url":"https://api.github.com/repos/github/fetch/subscribers","subscription_url":"https://api.github.com/repos/github/fetch/subscription","commits_url":"https://api.github.com/repos/github/fetch/commits{/sha}","git_commits_url":"https://api.github.com/repos/github/fetch/git/commits{/sha}","comments_url":"https://api.github.com/repos/github/fetch/comments{/number}","issue_comment_url":"https://api.github.com/repos/github/fetch/issues/comments{/number}","contents_url":"https://api.github.com/repos/github/fetch/contents/{+path}","compare_url":"https://api.github.com/repos/github/fetch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/github/fetch/merges","archive_url":"https://api.github.com/repos/github/fetch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/github/fetch/downloads","issues_url":"https://api.github.com/repos/github/fetch/issues{/number}","pulls_url":"https://api.github.com/repos/github/fetch/pulls{/number}","milestones_url":"https://api.github.com/repos/github/fetch/milestones{/number}","notifications_url":"https://api.github.com/repos/github/fetch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/github/fetch/labels{/name}","releases_url":"https://api.github.com/repos/github/fetch/releases{/id}","deployments_url":"https://api.github.com/repos/github/fetch/deployments","created_at":"2014-10-13T00:26:19Z","updated_at":"2016-12-06T13:37:53Z","pushed_at":"2016-12-06T14:08:03Z","git_url":"git://github.com/github/fetch.git","ssh_url":"git@github.com:github/fetch.git","clone_url":"https://github.com/github/fetch.git","svn_url":"https://github.com/github/fetch","homepage":"http://github.github.io/fetch/","size":712,"stargazers_count":11552,"watchers_count":11552,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":756,"mirror_url":null,"open_issues_count":4,"forks":756,"open_issues":4,"watchers":11552,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/github/fetch/pulls/449"},"html":{"href":"https://github.com/github/fetch/pull/449"},"issue":{"href":"https://api.github.com/repos/github/fetch/issues/449"},"comments":{"href":"https://api.github.com/repos/github/fetch/issues/449/comments"},"review_comments":{"href":"https://api.github.com/repos/github/fetch/pulls/449/comments"},"review_comment":{"href":"https://api.github.com/repos/github/fetch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/github/fetch/pulls/449/commits"},"statuses":{"href":"https://api.github.com/repos/github/fetch/statuses/959eb056a1cf08b28e9f9efb1ce57186fce1213d"}}}}
{"actor":{"display_login":"mislav"}}