From 2d8d064ce8fd14678e95f0be80dc5a07a64015ad Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 25 Jul 2019 16:50:30 -0400 Subject: [PATCH] Fix missing cookie after redirect response with filter (fixes issue #2689, see issue #2622) --- .../net_service/resource_request_handler_wrapper.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libcef/browser/net_service/resource_request_handler_wrapper.cc b/libcef/browser/net_service/resource_request_handler_wrapper.cc index 2f72b08a6..5c47d7038 100644 --- a/libcef/browser/net_service/resource_request_handler_wrapper.cc +++ b/libcef/browser/net_service/resource_request_handler_wrapper.cc @@ -720,6 +720,11 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler { return; } + if (state->cookie_filter_) { + // Remove the flags that were added in ContinueWithLoadedCookies. + request->load_flags &= ~kLoadNoCookiesFlags; + } + if (!state->handler_) { // Cookies may come from a scheme handler. MaybeSaveCookies( @@ -818,11 +823,6 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler { base::BindOnce(std::move(callback), response_mode, nullptr, new_url); if (response_mode == ResponseMode::RESTART) { - if (state->cookie_filter_) { - // Remove the flags that were added in ContinueWithLoadedCookies. - request->load_flags &= ~kLoadNoCookiesFlags; - } - // Get any cookies after the restart. std::move(exec_callback).Run(); return;