mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: explicitly cancel redirects when mode is 'error' (#20686)
This commit is contained in:
committed by
Cheng Zhao
parent
cde2aae6b5
commit
2abea22b4b
@@ -427,6 +427,7 @@ void URLRequestNS::OnRedirect(
|
||||
|
||||
switch (redirect_mode_) {
|
||||
case network::mojom::RedirectMode::kError:
|
||||
Cancel();
|
||||
EmitError(
|
||||
EventType::kRequest,
|
||||
"Request cannot follow redirect with the current redirect mode");
|
||||
|
||||
Reference in New Issue
Block a user