{"action":"created","comment":{"url":"https://api.github.com/repos/whatwg/fetch/pulls/comments/40059100","id":40059100,"diff_hunk":"@@ -4167,40 +4235,90 @@ <h4 id=\"should-response-to-request-be-blocked-due-to-nosniff?\"><dfn title=\"shoul\n <ol>\n  <li><p>Let <var title>p</var> be a new promise.\n \n- <li><p>Let <var title>r</var> be the associated\n+ <li><p>Let <var title>request</var> be the associated\n  <span title=concept-request>request</span> of the result of invoking the initial value of\n  <code title=dom-Request>Request</code> as constructor with <var title>input</var> and\n  <var title>init</var> as arguments. If this throws an exception, reject\n- <var title>p</var> with it.\n+ <var title>p</var> with it and return <var title>p</var>.\n \n- <li><p>Set <var title>r</var>'s <span title=concept-request-initiator>initiator</span> to\n+ <li><p>Set <var title>request</var>'s <span title=concept-request-initiator>initiator</span> to\n  \"<code title>fetch</code>\".\n \n- <li><p>Set <var title>r</var>'s\n+ <li><p>Set <var title>request</var>'s\n  <span title=concept-request-destination>destination</span> to\n  \"<code title>subresource</code>\".\n \n+ <li><p>Let <var title>stream</var> be null.\n+\n  <li>\n   <p>Run the following <span data-anolis-spec=html>in parallel</span>:\n \n-  <p><span title=concept-fetch>Fetch</span> <var title>r</var>.\n+  <p><span title=concept-fetch>Fetch</span> <var title>request</var>.\n \n   <p>To <span>process response</span> for <var title>response</var>, run these substeps:\n \n   <ol>\n    <li><p>If <var title>response</var>'s <span title=concept-response-type>type</span> is\n    \"<code title>error</code>\", reject <var title>p</var> with a\n-   <code title>TypeError</code>.\n+   <code title>TypeError</code> and abort these steps.\n \n-   <li><p>Otherwise, resolve <var title>p</var> with a new <code>Response</code> object\n-   associated with <var title>response</var> and a new <code>Headers</code> object whose\n+   <li><p>Let <var title>res</var> be a new <code>Response</code> object associated with\n+   <var title>response</var> and a new <code>Headers</code> object whose\n    <span title=concept-Headers-guard>guard</span> is \"<code title>immutable</code>\".\n+\n+   <li><p>If <var title>response</var>'s status is a <span>null body status</span>, resolve\n+   <var title>p</var> with <var title>res</var> and abort these steps.\n+\n+   <li><p>Let <var title>pull</var> be an action that\n+   <span title=concept-fetch-resume>resumes</span> the ongoing fetch if it is\n+   <span title=concept-fetch-suspend>suspended</span>.\n+\n+   <li><p>Let <var title>cancel</var> be an action that\n+   <span title=concept-fetch-terminate>terminates</span> the ongoing fetch with reason\n+   <i title>end-user abort</i>.\n+\n+   <li><p>Let <var title>strategy</var> be an object. The user agent may choose any object.\n+   <p class=\"note no-backref\"><var title>strategy</var> is used to control the queuing strategy of\n+   <var title>stream</var> constructed below.\n+\n+   <li><p>Set <var title>stream</var> to the result of\n+   <span title=concept-construct-ReadableStream>constructing</span> a\n+   <span title=concept-ReadableStream>ReadableStream</span> with <var title>strategy</var>,\n+   <var title>pull</var> and <var title>cancel</var>. If that threw an exception, run the following\n+   substeps:\n+   <ol>\n+    <li><p>Reject <var title>p</var> with that exception.\n+\n+    <li><p><span title=concept-fetch-terminate>Terminate</span> the ongoing fetch with reason\n+    <i title>fatal</i>.\n+   </ol>\n+\n+   <li><p>Otherwise, run the following substeps:\n+   <ol>\n+    <li><p>Set <var title>res</var>'s <span title=concept-Response-readable-stream>readable\n+    stream</span> to <var title>stream</var>.\n+\n+    <li><p>Resolve <var title>p</var> with <var title>res</var title>.\n+   </ol>\n   </ol>\n+  <p>To <span>process response body</span> for <var title>response</var>, run these substeps:\n+  <ol>\n+   <li><p>If <var title>stream</var> is null, abort these steps.\n+\n+   <li><p><span title=concept-enqueue-ReadableStream>Enqueue</span> a <code>Uint8Array</code> whose\n+   contents are <var title>response</var>'s <span title=concept-response-body>body</span> into\n+   <var title>stream</var>.\n \n-  <p>To <span>process response body</span> for <var title>response</var>, do nothing.\n+   <li><p>Clear out <var title>response</var>'s <span title=concept-response-body>body</span>.","path":"Overview.src.html","position":528,"original_position":528,"commit_id":"6b5d2b46008baa0114d8830a62413adf26e461b7","original_commit_id":"6b5d2b46008baa0114d8830a62413adf26e461b7","user":{"login":"annevk","id":1544111,"avatar_url":"https://avatars.githubusercontent.com/u/1544111?v=3","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":"I don't like this. We should define this more naturally. concept-response-body should be a stream that simply pipes into this one or some such.","created_at":"2015-09-22T07:34:28Z","updated_at":"2015-09-22T07:34:28Z","html_url":"https://github.com/whatwg/fetch/pull/128#discussion_r40059100","pull_request_url":"https://api.github.com/repos/whatwg/fetch/pulls/128","_links":{"self":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/comments/40059100"},"html":{"href":"https://github.com/whatwg/fetch/pull/128#discussion_r40059100"},"pull_request":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/128"}}},"pull_request":{"url":"https://api.github.com/repos/whatwg/fetch/pulls/128","id":45374224,"html_url":"https://github.com/whatwg/fetch/pull/128","diff_url":"https://github.com/whatwg/fetch/pull/128.diff","patch_url":"https://github.com/whatwg/fetch/pull/128.patch","issue_url":"https://api.github.com/repos/whatwg/fetch/issues/128","number":128,"state":"open","locked":false,"title":"Introduce Response.body. (#118)","user":{"login":"yutakahirano","id":5187874,"avatar_url":"https://avatars.githubusercontent.com/u/5187874?v=3","gravatar_id":"","url":"https://api.github.com/users/yutakahirano","html_url":"https://github.com/yutakahirano","followers_url":"https://api.github.com/users/yutakahirano/followers","following_url":"https://api.github.com/users/yutakahirano/following{/other_user}","gists_url":"https://api.github.com/users/yutakahirano/gists{/gist_id}","starred_url":"https://api.github.com/users/yutakahirano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yutakahirano/subscriptions","organizations_url":"https://api.github.com/users/yutakahirano/orgs","repos_url":"https://api.github.com/users/yutakahirano/repos","events_url":"https://api.github.com/users/yutakahirano/events{/privacy}","received_events_url":"https://api.github.com/users/yutakahirano/received_events","type":"User","site_admin":false},"body":"This change introduces `body` property of Response class. Note that we don't\r\nintroduce `Request.body` at this moment and hence some properties and algorithms\r\ndefined in the Body mixin are moved to Request and Response.\r\n\r\n`bodyUsed` property is now based on `IsDisturbed` defined in the streams spec.\r\nRequest.bodyUsed emulates the behavior without using streams.","created_at":"2015-09-18T06:50:52Z","updated_at":"2015-09-22T07:34:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c7742ef9550891b763bd696abbe1b750d422eaa4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/whatwg/fetch/pulls/128/commits","review_comments_url":"https://api.github.com/repos/whatwg/fetch/pulls/128/comments","review_comment_url":"https://api.github.com/repos/whatwg/fetch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/whatwg/fetch/issues/128/comments","statuses_url":"https://api.github.com/repos/whatwg/fetch/statuses/6b5d2b46008baa0114d8830a62413adf26e461b7","head":{"label":"yutakahirano:response-body","ref":"response-body","sha":"6b5d2b46008baa0114d8830a62413adf26e461b7","user":{"login":"yutakahirano","id":5187874,"avatar_url":"https://avatars.githubusercontent.com/u/5187874?v=3","gravatar_id":"","url":"https://api.github.com/users/yutakahirano","html_url":"https://github.com/yutakahirano","followers_url":"https://api.github.com/users/yutakahirano/followers","following_url":"https://api.github.com/users/yutakahirano/following{/other_user}","gists_url":"https://api.github.com/users/yutakahirano/gists{/gist_id}","starred_url":"https://api.github.com/users/yutakahirano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yutakahirano/subscriptions","organizations_url":"https://api.github.com/users/yutakahirano/orgs","repos_url":"https://api.github.com/users/yutakahirano/repos","events_url":"https://api.github.com/users/yutakahirano/events{/privacy}","received_events_url":"https://api.github.com/users/yutakahirano/received_events","type":"User","site_admin":false},"repo":{"id":41904677,"name":"fetch","full_name":"yutakahirano/fetch","owner":{"login":"yutakahirano","id":5187874,"avatar_url":"https://avatars.githubusercontent.com/u/5187874?v=3","gravatar_id":"","url":"https://api.github.com/users/yutakahirano","html_url":"https://github.com/yutakahirano","followers_url":"https://api.github.com/users/yutakahirano/followers","following_url":"https://api.github.com/users/yutakahirano/following{/other_user}","gists_url":"https://api.github.com/users/yutakahirano/gists{/gist_id}","starred_url":"https://api.github.com/users/yutakahirano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yutakahirano/subscriptions","organizations_url":"https://api.github.com/users/yutakahirano/orgs","repos_url":"https://api.github.com/users/yutakahirano/repos","events_url":"https://api.github.com/users/yutakahirano/events{/privacy}","received_events_url":"https://api.github.com/users/yutakahirano/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yutakahirano/fetch","description":"Fetch Standard","fork":true,"url":"https://api.github.com/repos/yutakahirano/fetch","forks_url":"https://api.github.com/repos/yutakahirano/fetch/forks","keys_url":"https://api.github.com/repos/yutakahirano/fetch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yutakahirano/fetch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yutakahirano/fetch/teams","hooks_url":"https://api.github.com/repos/yutakahirano/fetch/hooks","issue_events_url":"https://api.github.com/repos/yutakahirano/fetch/issues/events{/number}","events_url":"https://api.github.com/repos/yutakahirano/fetch/events","assignees_url":"https://api.github.com/repos/yutakahirano/fetch/assignees{/user}","branches_url":"https://api.github.com/repos/yutakahirano/fetch/branches{/branch}","tags_url":"https://api.github.com/repos/yutakahirano/fetch/tags","blobs_url":"https://api.github.com/repos/yutakahirano/fetch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yutakahirano/fetch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yutakahirano/fetch/git/refs{/sha}","trees_url":"https://api.github.com/repos/yutakahirano/fetch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yutakahirano/fetch/statuses/{sha}","languages_url":"https://api.github.com/repos/yutakahirano/fetch/languages","stargazers_url":"https://api.github.com/repos/yutakahirano/fetch/stargazers","contributors_url":"https://api.github.com/repos/yutakahirano/fetch/contributors","subscribers_url":"https://api.github.com/repos/yutakahirano/fetch/subscribers","subscription_url":"https://api.github.com/repos/yutakahirano/fetch/subscription","commits_url":"https://api.github.com/repos/yutakahirano/fetch/commits{/sha}","git_commits_url":"https://api.github.com/repos/yutakahirano/fetch/git/commits{/sha}","comments_url":"https://api.github.com/repos/yutakahirano/fetch/comments{/number}","issue_comment_url":"https://api.github.com/repos/yutakahirano/fetch/issues/comments{/number}","contents_url":"https://api.github.com/repos/yutakahirano/fetch/contents/{+path}","compare_url":"https://api.github.com/repos/yutakahirano/fetch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yutakahirano/fetch/merges","archive_url":"https://api.github.com/repos/yutakahirano/fetch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yutakahirano/fetch/downloads","issues_url":"https://api.github.com/repos/yutakahirano/fetch/issues{/number}","pulls_url":"https://api.github.com/repos/yutakahirano/fetch/pulls{/number}","milestones_url":"https://api.github.com/repos/yutakahirano/fetch/milestones{/number}","notifications_url":"https://api.github.com/repos/yutakahirano/fetch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yutakahirano/fetch/labels{/name}","releases_url":"https://api.github.com/repos/yutakahirano/fetch/releases{/id}","created_at":"2015-09-04T08:09:26Z","updated_at":"2015-09-04T08:09:27Z","pushed_at":"2015-09-18T06:50:31Z","git_url":"git://github.com/yutakahirano/fetch.git","ssh_url":"git@github.com:yutakahirano/fetch.git","clone_url":"https://github.com/yutakahirano/fetch.git","svn_url":"https://github.com/yutakahirano/fetch","homepage":"https://fetch.spec.whatwg.org/","size":3506,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"whatwg:master","ref":"master","sha":"80540f2b891b4d9301c60c5e1e216f40be3d6b80","user":{"login":"whatwg","id":2226336,"avatar_url":"https://avatars.githubusercontent.com/u/2226336?v=3","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,"name":"fetch","full_name":"whatwg/fetch","owner":{"login":"whatwg","id":2226336,"avatar_url":"https://avatars.githubusercontent.com/u/2226336?v=3","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},"private":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}","created_at":"2012-09-12T08:39:20Z","updated_at":"2015-09-21T01:47:41Z","pushed_at":"2015-09-18T06:50:54Z","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":4761,"stargazers_count":142,"watchers_count":142,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":35,"forks":19,"open_issues":35,"watchers":142,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/128"},"html":{"href":"https://github.com/whatwg/fetch/pull/128"},"issue":{"href":"https://api.github.com/repos/whatwg/fetch/issues/128"},"comments":{"href":"https://api.github.com/repos/whatwg/fetch/issues/128/comments"},"review_comments":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/128/comments"},"review_comment":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/128/commits"},"statuses":{"href":"https://api.github.com/repos/whatwg/fetch/statuses/6b5d2b46008baa0114d8830a62413adf26e461b7"}}}}