Index: content/browser/loader/resource_loader.cc |
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc |
index 0339cf11c0d5ade2f2f4ebe14a64cd3da4289c3b..61df345181c4f36934833a24a17e9b638ce76387 100644 |
--- a/content/browser/loader/resource_loader.cc |
+++ b/content/browser/loader/resource_loader.cc |
@@ -280,6 +280,28 @@ void ResourceLoader::OnReceivedRedirect(net::URLRequest* unused, |
return; |
} |
+ if (info->fetch_redirect_mode() == FETCH_REDIRECT_MODE_ERROR) { |
+ Cancel(); |
+ return; |
+ } else if (info->fetch_redirect_mode() == FETCH_REDIRECT_MODE_MANUAL) { |
+ // TODO(horo): If we will support upload progress events for Fetch API, we |
mmenke
2015/08/11 16:06:14
nit: will -> "are going to" (Or just remove "wil
horo
2015/08/11 16:43:55
Done.
|
+ // will have to call ReportUploadProgress(). |
+ DCHECK(!GetRequestInfo()->is_upload_progress_enabled()); |
+ |
+ CompleteResponseStarted(); |
+ DCHECK(!is_deferred()); |
mmenke
2015/08/11 16:06:14
Oh...I completely misunderstood this deferred stuf
horo
2015/08/11 16:43:55
I added is_redirect_response argument to CompleteR
|
+ |
+ // There is no need to read the response body here because there is no way |
+ // to read the body of opaque-redirect filtered response's internal |
+ // response. |
+ // TODO(horo): If we will support any API which expose the internal body, |
mmenke
2015/08/11 16:06:14
nit: will -> "are going to" (Or just remove "wil
horo
2015/08/11 16:43:55
Done.
|
+ // we will have to read the body before calling ResponseCompleted(). And |
+ // also Cache changes will be needed because it doesn't store the body of |
+ // redirect responses. |
+ ResponseCompleted(); |
+ return; |
+ } |
+ |
delegate_->DidReceiveRedirect(this, redirect_info.new_url); |
if (delegate_->HandleExternalProtocol(this, redirect_info.new_url)) { |