{"action":"created","comment":{"url":"https://api.github.com/repos/whatwg/fetch/pulls/comments/235726986","pull_request_review_id":177658446,"id":235726986,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTcyNjk4Ng==","diff_hunk":"@@ -2520,6 +2726,100 @@ consideration for the security consequences. New exceptions can be proposed by\n <a href=https://github.com/whatwg/fetch/issues/new>filing an issue</a>.\n \n \n+<h3 id=content-type-header>`<code>Content-Type</code>` header</h3>\n+\n+<p>The `<code>Content-Type</code>` header is largely defined in HTTP. Its processing model is\n+defined here as the ABNF defined in HTTP is not compatible with web content. [[HTTP]]\n+\n+<p>To\n+<dfn export for=\"header list\" lt=\"extract a MIME type|extracting a MIME type\" id=concept-header-extract-mime-type>extract a MIME type</dfn>\n+from a <a for=/>header list</a> <var>headers</var>, run these steps:\n+\n+<ol>\n+ <li><p>Let <var>charset</var> be null.\n+\n+ <li><p>Let <var>essence</var> be null.\n+\n+ <li><p>Let <var>mimeType</var> be null.\n+\n+ <li><p>Let <var>values</var> be the result of\n+ <a for=\"header list\">getting, decoding, and splitting</a> `<code>Content-Type</code>` from\n+ <var>headers</var>.\n+\n+ <li><p>If <var>values</var> is null, then return failure.\n+\n+ <li>\n+  <p><a for=list>For each</a> <var>value</var> of <var>values</var>:\n+\n+  <ol>\n+   <li><p>Set <var>mimeType</var> to the result of <a lt=\"parse a MIME type\">parsing</a>\n+   <var>value</var>.\n+\n+   <li><p>If <var>mimeType</var> is failure, then <a for=iteration>continue</a>.\n+\n+   <li>\n+    <p>If <var>mimeType</var>'s <a for=\"MIME type\">essence</a> is not \"<code>*/*</code>\" or\n+    <var>essence</var>, then:\n+\n+    <ol>\n+     <li><p>Set <var>charset</var> to null.\n+\n+     <li><p>If <var>mimeType</var>'s <a for=\"MIME type\">parameters</a>[\"<code>charset</code>\"]","path":"fetch.bs","position":342,"original_position":329,"commit_id":"c1f48b3a35d478d2a7d964ea1fba16e5c268821e","original_commit_id":"392d61800b660f34784a619f21071e781612fcc5","user":{"login":"annevk","id":1544111,"node_id":"MDQ6VXNlcjE1NDQxMTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1544111?v=4","gravatar_id":"","url":"https://api.github.com/users/annevk","html_url":"https://github.com/annevk","followers_url":"https://api.github.com/users/annevk/followers","following_url":"https://api.github.com/users/annevk/following{/other_user}","gists_url":"https://api.github.com/users/annevk/gists{/gist_id}","starred_url":"https://api.github.com/users/annevk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annevk/subscriptions","organizations_url":"https://api.github.com/users/annevk/orgs","repos_url":"https://api.github.com/users/annevk/repos","events_url":"https://api.github.com/users/annevk/events{/privacy}","received_events_url":"https://api.github.com/users/annevk/received_events","type":"User","site_admin":false},"body":"https://github.com/whatwg/fetch/issues/838","created_at":"2018-11-22T13:32:53Z","updated_at":"2018-11-22T13:32:53Z","html_url":"https://github.com/whatwg/fetch/pull/831#discussion_r235726986","pull_request_url":"https://api.github.com/repos/whatwg/fetch/pulls/831","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/comments/235726986"},"html":{"href":"https://github.com/whatwg/fetch/pull/831#discussion_r235726986"},"pull_request":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/831"}},"in_reply_to_id":235103042},"pull_request":{"url":"https://api.github.com/repos/whatwg/fetch/pulls/831","id":229710730,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NzEwNzMw","html_url":"https://github.com/whatwg/fetch/pull/831","diff_url":"https://github.com/whatwg/fetch/pull/831.diff","patch_url":"https://github.com/whatwg/fetch/pull/831.patch","issue_url":"https://api.github.com/repos/whatwg/fetch/issues/831","number":831,"state":"open","locked":false,"title":"Define the Content-Type header parser","user":{"login":"annevk","id":1544111,"node_id":"MDQ6VXNlcjE1NDQxMTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1544111?v=4","gravatar_id":"","url":"https://api.github.com/users/annevk","html_url":"https://github.com/annevk","followers_url":"https://api.github.com/users/annevk/followers","following_url":"https://api.github.com/users/annevk/following{/other_user}","gists_url":"https://api.github.com/users/annevk/gists{/gist_id}","starred_url":"https://api.github.com/users/annevk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annevk/subscriptions","organizations_url":"https://api.github.com/users/annevk/orgs","repos_url":"https://api.github.com/users/annevk/repos","events_url":"https://api.github.com/users/annevk/events{/privacy}","received_events_url":"https://api.github.com/users/annevk/received_events","type":"User","site_admin":false},"body":"Also known as \"extract a MIME type\" down right.\n\nTests: https://github.com/web-platform-tests/wpt/pull/10525.\n\nHelps with #814.\n\nFixes #529. Closes https://github.com/whatwg/mimesniff/issues/30.\n\n\n<!--\n    This comment and the below content is programatically generated.\n    You may add a comma-separated list of anchors you'd like a\n    direct link to below (e.g. #idl-serializers, #idl-sequence):\n\n    Don't remove this comment or modify anything below this line.\n    If you don't want a preview generated for this pull request,\n    just replace the whole of this comment's content by \"no preview\"\n    and remove what's below.\n-->\n***\n<a href=\"https://whatpr.org/fetch/831.html\" title=\"Last updated on Nov 21, 2018, 4:16 PM GMT (c1f48b3)\">Preview</a> | <a href=\"https://whatpr.org/fetch/831/a243f1f...c1f48b3.html\" title=\"Last updated on Nov 21, 2018, 4:16 PM GMT (c1f48b3)\">Diff</a>","created_at":"2018-11-09T14:30:02Z","updated_at":"2018-11-22T13:32:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7d56d6257464bcc39f437f1188f2113a39132e6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/whatwg/fetch/pulls/831/commits","review_comments_url":"https://api.github.com/repos/whatwg/fetch/pulls/831/comments","review_comment_url":"https://api.github.com/repos/whatwg/fetch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/whatwg/fetch/issues/831/comments","statuses_url":"https://api.github.com/repos/whatwg/fetch/statuses/c1f48b3a35d478d2a7d964ea1fba16e5c268821e","head":{"label":"whatwg:annevk/response-content-type","ref":"annevk/response-content-type","sha":"c1f48b3a35d478d2a7d964ea1fba16e5c268821e","user":{"login":"whatwg","id":2226336,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMjYzMzY=","avatar_url":"https://avatars1.githubusercontent.com/u/2226336?v=4","gravatar_id":"","url":"https://api.github.com/users/whatwg","html_url":"https://github.com/whatwg","followers_url":"https://api.github.com/users/whatwg/followers","following_url":"https://api.github.com/users/whatwg/following{/other_user}","gists_url":"https://api.github.com/users/whatwg/gists{/gist_id}","starred_url":"https://api.github.com/users/whatwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatwg/subscriptions","organizations_url":"https://api.github.com/users/whatwg/orgs","repos_url":"https://api.github.com/users/whatwg/repos","events_url":"https://api.github.com/users/whatwg/events{/privacy}","received_events_url":"https://api.github.com/users/whatwg/received_events","type":"Organization","site_admin":false},"repo":{"id":5777189,"node_id":"MDEwOlJlcG9zaXRvcnk1Nzc3MTg5","name":"fetch","full_name":"whatwg/fetch","private":false,"owner":{"login":"whatwg","id":2226336,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMjYzMzY=","avatar_url":"https://avatars1.githubusercontent.com/u/2226336?v=4","gravatar_id":"","url":"https://api.github.com/users/whatwg","html_url":"https://github.com/whatwg","followers_url":"https://api.github.com/users/whatwg/followers","following_url":"https://api.github.com/users/whatwg/following{/other_user}","gists_url":"https://api.github.com/users/whatwg/gists{/gist_id}","starred_url":"https://api.github.com/users/whatwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatwg/subscriptions","organizations_url":"https://api.github.com/users/whatwg/orgs","repos_url":"https://api.github.com/users/whatwg/repos","events_url":"https://api.github.com/users/whatwg/events{/privacy}","received_events_url":"https://api.github.com/users/whatwg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/whatwg/fetch","description":"Fetch Standard","fork":false,"url":"https://api.github.com/repos/whatwg/fetch","forks_url":"https://api.github.com/repos/whatwg/fetch/forks","keys_url":"https://api.github.com/repos/whatwg/fetch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whatwg/fetch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whatwg/fetch/teams","hooks_url":"https://api.github.com/repos/whatwg/fetch/hooks","issue_events_url":"https://api.github.com/repos/whatwg/fetch/issues/events{/number}","events_url":"https://api.github.com/repos/whatwg/fetch/events","assignees_url":"https://api.github.com/repos/whatwg/fetch/assignees{/user}","branches_url":"https://api.github.com/repos/whatwg/fetch/branches{/branch}","tags_url":"https://api.github.com/repos/whatwg/fetch/tags","blobs_url":"https://api.github.com/repos/whatwg/fetch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whatwg/fetch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whatwg/fetch/git/refs{/sha}","trees_url":"https://api.github.com/repos/whatwg/fetch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whatwg/fetch/statuses/{sha}","languages_url":"https://api.github.com/repos/whatwg/fetch/languages","stargazers_url":"https://api.github.com/repos/whatwg/fetch/stargazers","contributors_url":"https://api.github.com/repos/whatwg/fetch/contributors","subscribers_url":"https://api.github.com/repos/whatwg/fetch/subscribers","subscription_url":"https://api.github.com/repos/whatwg/fetch/subscription","commits_url":"https://api.github.com/repos/whatwg/fetch/commits{/sha}","git_commits_url":"https://api.github.com/repos/whatwg/fetch/git/commits{/sha}","comments_url":"https://api.github.com/repos/whatwg/fetch/comments{/number}","issue_comment_url":"https://api.github.com/repos/whatwg/fetch/issues/comments{/number}","contents_url":"https://api.github.com/repos/whatwg/fetch/contents/{+path}","compare_url":"https://api.github.com/repos/whatwg/fetch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whatwg/fetch/merges","archive_url":"https://api.github.com/repos/whatwg/fetch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whatwg/fetch/downloads","issues_url":"https://api.github.com/repos/whatwg/fetch/issues{/number}","pulls_url":"https://api.github.com/repos/whatwg/fetch/pulls{/number}","milestones_url":"https://api.github.com/repos/whatwg/fetch/milestones{/number}","notifications_url":"https://api.github.com/repos/whatwg/fetch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whatwg/fetch/labels{/name}","releases_url":"https://api.github.com/repos/whatwg/fetch/releases{/id}","deployments_url":"https://api.github.com/repos/whatwg/fetch/deployments","created_at":"2012-09-12T08:39:20Z","updated_at":"2018-11-22T10:07:01Z","pushed_at":"2018-11-21T16:16:26Z","git_url":"git://github.com/whatwg/fetch.git","ssh_url":"git@github.com:whatwg/fetch.git","clone_url":"https://github.com/whatwg/fetch.git","svn_url":"https://github.com/whatwg/fetch","homepage":"https://fetch.spec.whatwg.org/","size":7081,"stargazers_count":1137,"watchers_count":1137,"language":"HTML","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":130,"mirror_url":null,"archived":false,"open_issues_count":148,"license":{"key":"cc-by-4.0","name":"Creative Commons Attribution 4.0 International","spdx_id":"CC-BY-4.0","url":"https://api.github.com/licenses/cc-by-4.0","node_id":"MDc6TGljZW5zZTI1"},"forks":130,"open_issues":148,"watchers":1137,"default_branch":"master"}},"base":{"label":"whatwg:master","ref":"master","sha":"a243f1f8af10f78ead83953bfb0f1c6ee21cb8a1","user":{"login":"whatwg","id":2226336,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMjYzMzY=","avatar_url":"https://avatars1.githubusercontent.com/u/2226336?v=4","gravatar_id":"","url":"https://api.github.com/users/whatwg","html_url":"https://github.com/whatwg","followers_url":"https://api.github.com/users/whatwg/followers","following_url":"https://api.github.com/users/whatwg/following{/other_user}","gists_url":"https://api.github.com/users/whatwg/gists{/gist_id}","starred_url":"https://api.github.com/users/whatwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatwg/subscriptions","organizations_url":"https://api.github.com/users/whatwg/orgs","repos_url":"https://api.github.com/users/whatwg/repos","events_url":"https://api.github.com/users/whatwg/events{/privacy}","received_events_url":"https://api.github.com/users/whatwg/received_events","type":"Organization","site_admin":false},"repo":{"id":5777189,"node_id":"MDEwOlJlcG9zaXRvcnk1Nzc3MTg5","name":"fetch","full_name":"whatwg/fetch","private":false,"owner":{"login":"whatwg","id":2226336,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMjYzMzY=","avatar_url":"https://avatars1.githubusercontent.com/u/2226336?v=4","gravatar_id":"","url":"https://api.github.com/users/whatwg","html_url":"https://github.com/whatwg","followers_url":"https://api.github.com/users/whatwg/followers","following_url":"https://api.github.com/users/whatwg/following{/other_user}","gists_url":"https://api.github.com/users/whatwg/gists{/gist_id}","starred_url":"https://api.github.com/users/whatwg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatwg/subscriptions","organizations_url":"https://api.github.com/users/whatwg/orgs","repos_url":"https://api.github.com/users/whatwg/repos","events_url":"https://api.github.com/users/whatwg/events{/privacy}","received_events_url":"https://api.github.com/users/whatwg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/whatwg/fetch","description":"Fetch Standard","fork":false,"url":"https://api.github.com/repos/whatwg/fetch","forks_url":"https://api.github.com/repos/whatwg/fetch/forks","keys_url":"https://api.github.com/repos/whatwg/fetch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whatwg/fetch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whatwg/fetch/teams","hooks_url":"https://api.github.com/repos/whatwg/fetch/hooks","issue_events_url":"https://api.github.com/repos/whatwg/fetch/issues/events{/number}","events_url":"https://api.github.com/repos/whatwg/fetch/events","assignees_url":"https://api.github.com/repos/whatwg/fetch/assignees{/user}","branches_url":"https://api.github.com/repos/whatwg/fetch/branches{/branch}","tags_url":"https://api.github.com/repos/whatwg/fetch/tags","blobs_url":"https://api.github.com/repos/whatwg/fetch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whatwg/fetch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whatwg/fetch/git/refs{/sha}","trees_url":"https://api.github.com/repos/whatwg/fetch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whatwg/fetch/statuses/{sha}","languages_url":"https://api.github.com/repos/whatwg/fetch/languages","stargazers_url":"https://api.github.com/repos/whatwg/fetch/stargazers","contributors_url":"https://api.github.com/repos/whatwg/fetch/contributors","subscribers_url":"https://api.github.com/repos/whatwg/fetch/subscribers","subscription_url":"https://api.github.com/repos/whatwg/fetch/subscription","commits_url":"https://api.github.com/repos/whatwg/fetch/commits{/sha}","git_commits_url":"https://api.github.com/repos/whatwg/fetch/git/commits{/sha}","comments_url":"https://api.github.com/repos/whatwg/fetch/comments{/number}","issue_comment_url":"https://api.github.com/repos/whatwg/fetch/issues/comments{/number}","contents_url":"https://api.github.com/repos/whatwg/fetch/contents/{+path}","compare_url":"https://api.github.com/repos/whatwg/fetch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whatwg/fetch/merges","archive_url":"https://api.github.com/repos/whatwg/fetch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whatwg/fetch/downloads","issues_url":"https://api.github.com/repos/whatwg/fetch/issues{/number}","pulls_url":"https://api.github.com/repos/whatwg/fetch/pulls{/number}","milestones_url":"https://api.github.com/repos/whatwg/fetch/milestones{/number}","notifications_url":"https://api.github.com/repos/whatwg/fetch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whatwg/fetch/labels{/name}","releases_url":"https://api.github.com/repos/whatwg/fetch/releases{/id}","deployments_url":"https://api.github.com/repos/whatwg/fetch/deployments","created_at":"2012-09-12T08:39:20Z","updated_at":"2018-11-22T10:07:01Z","pushed_at":"2018-11-21T16:16:26Z","git_url":"git://github.com/whatwg/fetch.git","ssh_url":"git@github.com:whatwg/fetch.git","clone_url":"https://github.com/whatwg/fetch.git","svn_url":"https://github.com/whatwg/fetch","homepage":"https://fetch.spec.whatwg.org/","size":7081,"stargazers_count":1137,"watchers_count":1137,"language":"HTML","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":130,"mirror_url":null,"archived":false,"open_issues_count":148,"license":{"key":"cc-by-4.0","name":"Creative Commons Attribution 4.0 International","spdx_id":"CC-BY-4.0","url":"https://api.github.com/licenses/cc-by-4.0","node_id":"MDc6TGljZW5zZTI1"},"forks":130,"open_issues":148,"watchers":1137,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/831"},"html":{"href":"https://github.com/whatwg/fetch/pull/831"},"issue":{"href":"https://api.github.com/repos/whatwg/fetch/issues/831"},"comments":{"href":"https://api.github.com/repos/whatwg/fetch/issues/831/comments"},"review_comments":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/831/comments"},"review_comment":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/831/commits"},"statuses":{"href":"https://api.github.com/repos/whatwg/fetch/statuses/c1f48b3a35d478d2a7d964ea1fba16e5c268821e"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"annevk"}}