fix: explicitly cancel redirects when mode is 'error' (#20686)

This commit is contained in:
Jeremy Apthorp 2019-10-22 17:10:37 -07:00 committed by Cheng Zhao
parent cde2aae6b5
commit 2abea22b4b

View file

@ -427,6 +427,7 @@ void URLRequestNS::OnRedirect(
switch (redirect_mode_) { switch (redirect_mode_) {
case network::mojom::RedirectMode::kError: case network::mojom::RedirectMode::kError:
Cancel();
EmitError( EmitError(
EventType::kRequest, EventType::kRequest,
"Request cannot follow redirect with the current redirect mode"); "Request cannot follow redirect with the current redirect mode");