{"action":"created","comment":{"url":"https://api.github.com/repos/whatwg/fetch/pulls/comments/51467375","id":51467375,"diff_hunk":"@@ -2430,7 +2354,87 @@ <h3 id=\"http-fetch\"><span class=\"secno\">5.3 </span>HTTP fetch</h3>\n </ol>\n \n \n-<h3 id=\"http-network-or-cache-fetch\"><span class=\"secno\">5.4 </span>HTTP-network-or-cache fetch</h3>\n+<h3 id=\"http-redirect-fetch\"><span class=\"secno\">5.4 </span>HTTP-redirect fetch</h3>\n+\n+<p class=\"note no-backref\">This algorithm will be used by <cite>HTML</cite>'s \"navigate\" algorithm\n+in addition to <a href=\"#concept-http-fetch\" title=\"concept-http-fetch\">HTTP fetch</a>.\n+<a href=\"#refsHTML\">[HTML]</a>\n+\n+<p>To perform an <dfn id=\"concept-http-redirect-fetch\" title=\"concept-http-redirect-fetch\">HTTP-redirect fetch</dfn> using\n+<var>request</var> and <var>response</var>, with an optional <i>CORS flag</i>, run these steps:\n+\n+<ol>\n+ <li><p>Let <var>actualResponse</var> be <var>response</var>, if <var>response</var> is not a\n+ <a href=\"#concept-filtered-response\" title=\"concept-filtered-response\">filtered response</a>, and <var>response</var>'s\n+ <a href=\"#concept-internal-response\" title=\"concept-internal-response\">internal response</a> otherwise.\n+\n+ <li><p>Let <var>location</var> be the result of <a href=\"#concept-header-parse\" title=\"concept-header-parse\">parsing</a>\n+ `<code title=\"\">Location</code>` in <var>actualResponse</var>'s\n+ <a href=\"#concept-response-header-list\" title=\"concept-response-header-list\">header list</a>.\n+\n+ <li><p>If <var>location</var> is null, return <var>response</var>.\n+\n+ <li><p>If <var>location</var> is failure, return a\n+ <a href=\"#concept-network-error\" title=\"concept-network-error\">network error</a>.\n+ <!-- only Gecko does this; and even that is currently more complicated -->","path":"Overview.html","position":159,"original_position":159,"commit_id":"9a267bec64d60ce0a8457eecf1b5e3f14bc73a3d","original_commit_id":"9a267bec64d60ce0a8457eecf1b5e3f14bc73a3d","user":{"login":"jakearchibald","id":93594,"avatar_url":"https://avatars.githubusercontent.com/u/93594?v=3","gravatar_id":"","url":"https://api.github.com/users/jakearchibald","html_url":"https://github.com/jakearchibald","followers_url":"https://api.github.com/users/jakearchibald/followers","following_url":"https://api.github.com/users/jakearchibald/following{/other_user}","gists_url":"https://api.github.com/users/jakearchibald/gists{/gist_id}","starred_url":"https://api.github.com/users/jakearchibald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakearchibald/subscriptions","organizations_url":"https://api.github.com/users/jakearchibald/orgs","repos_url":"https://api.github.com/users/jakearchibald/repos","events_url":"https://api.github.com/users/jakearchibald/events{/privacy}","received_events_url":"https://api.github.com/users/jakearchibald/received_events","type":"User","site_admin":false},"body":"Interesting, what do the other browsers do?","created_at":"2016-02-01T19:28:45Z","updated_at":"2016-02-01T19:28:45Z","html_url":"https://github.com/whatwg/fetch/pull/194#discussion_r51467375","pull_request_url":"https://api.github.com/repos/whatwg/fetch/pulls/194","_links":{"self":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/comments/51467375"},"html":{"href":"https://github.com/whatwg/fetch/pull/194#discussion_r51467375"},"pull_request":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/194"}}},"pull_request":{"url":"https://api.github.com/repos/whatwg/fetch/pulls/194","id":55647880,"html_url":"https://github.com/whatwg/fetch/pull/194","diff_url":"https://github.com/whatwg/fetch/pull/194.diff","patch_url":"https://github.com/whatwg/fetch/pull/194.patch","issue_url":"https://api.github.com/repos/whatwg/fetch/issues/194","number":194,"state":"open","locked":false,"title":"Introduce HTTP-redirect fetch","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":"See https://github.com/whatwg/html/issues/461 for context. This allows\nHTML to invoke a single algorithm to “handle redirects”, a concept it\nmentions but does not actually define.\n\nThis changes the processing rules for redirect mode “manual”, but since\nthat is a rather new feature that should be fine.","created_at":"2016-01-11T16:56:28Z","updated_at":"2016-02-01T19:28:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17481794ab84c92928aa14c42bf774c254c20c6d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/whatwg/fetch/pulls/194/commits","review_comments_url":"https://api.github.com/repos/whatwg/fetch/pulls/194/comments","review_comment_url":"https://api.github.com/repos/whatwg/fetch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/whatwg/fetch/issues/194/comments","statuses_url":"https://api.github.com/repos/whatwg/fetch/statuses/9a267bec64d60ce0a8457eecf1b5e3f14bc73a3d","head":{"label":"whatwg:redirect","ref":"redirect","sha":"9a267bec64d60ce0a8457eecf1b5e3f14bc73a3d","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}","deployments_url":"https://api.github.com/repos/whatwg/fetch/deployments","created_at":"2012-09-12T08:39:20Z","updated_at":"2016-02-01T05:14:59Z","pushed_at":"2016-01-29T21:57:01Z","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":4101,"stargazers_count":222,"watchers_count":222,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":45,"forks":30,"open_issues":45,"watchers":222,"default_branch":"master"}},"base":{"label":"whatwg:master","ref":"master","sha":"4147978673c15047d1a5d4a76b1a403a7d75a956","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}","deployments_url":"https://api.github.com/repos/whatwg/fetch/deployments","created_at":"2012-09-12T08:39:20Z","updated_at":"2016-02-01T05:14:59Z","pushed_at":"2016-01-29T21:57:01Z","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":4101,"stargazers_count":222,"watchers_count":222,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":45,"forks":30,"open_issues":45,"watchers":222,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/194"},"html":{"href":"https://github.com/whatwg/fetch/pull/194"},"issue":{"href":"https://api.github.com/repos/whatwg/fetch/issues/194"},"comments":{"href":"https://api.github.com/repos/whatwg/fetch/issues/194/comments"},"review_comments":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/194/comments"},"review_comment":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/whatwg/fetch/pulls/194/commits"},"statuses":{"href":"https://api.github.com/repos/whatwg/fetch/statuses/9a267bec64d60ce0a8457eecf1b5e3f14bc73a3d"}}}}