MemoryCache: Do not reuse sync Resources for sync requests
For synchronous requests, Resource::WillFollowRedirect() is not called and thus redirect chain is not set in Resources and redirects are not reported to Resource. Therefore, this breaks assumptions around redirects and revalidations: - The URLs of the original response and revalidation response can be different without WillFollowRedirect() calls, and this causes CHECK failure in Resource::RevalidationSucceeded(). - We forbid successful revalidation if either the old or new request is redirected, but this restriction relies on WillFollowRedirect() and thus is bypassed in sync cases. This CL forbids reusing and revalidating synchronously-loaded Resources for sync requests, to avoid these issues. Bug: 618967 Change-Id: Ic8c668b751a69f594f3d08b7d63b9832b6bcc56e Reviewed-on: https://chromium-review.googlesource.com/567679 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by:Takeshi Yoshino <tyoshino@chromium.org> Reviewed-by:
Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#486870}
Showing
Please register or sign in to comment