Fix missing cookie after redirect response with filter (fixes issue #2689, see issue #2622)

This commit is contained in:
Marshall Greenblatt 2019-07-25 16:50:30 -04:00
parent 4c70c67042
commit 2d8d064ce8
1 changed files with 5 additions and 5 deletions

View File

@ -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;