From 83e671f77e5c7fa7381b8a7210a01998524b8618 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Tue, 22 Oct 2019 13:27:41 -0700 Subject: [PATCH] fix: explicitly cancel redirects when mode is 'error' --- shell/browser/api/atom_api_url_request_ns.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/shell/browser/api/atom_api_url_request_ns.cc b/shell/browser/api/atom_api_url_request_ns.cc index 523db8c9cd8a2..664a39dc8fedc 100644 --- a/shell/browser/api/atom_api_url_request_ns.cc +++ b/shell/browser/api/atom_api_url_request_ns.cc @@ -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");