Use No-Vary-Search for externally conditionalized requests The implementation of No-Vary-Search support for the net::HttpCache originally did not intend to support externally conditionalized requests, as it was not considered useful. However, because `(mode_ & READ)` is equivalent to `(mode_ & READ_META) || (mode_ & READ_DATA)', in practice it accidentally supported them. However, an assertion before sending the request caused it to crash in this case. It is better for consistency to support No-Vary-Search when JavaScript gives us a conditional request, and it may be useful for performance as well, so change to explicitly support No-Very-Search in this case. This means that requests that have "If-Modified-Since" or "If-None-Match" headers already on entry to the cache will intentionally have their URLs rewritten by the NoVarySearchCache if a matching disk cache entry exists. BUG=399278577,382394774 Low-Coverage-Reason: TESTS_IN_SEPARATE_CL Tests are coming. Change-Id: I8b22f81d9aa0ccb384fe70fdcb8b793be4c8838e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6305742 Commit-Queue: Adam Rice <ricea@chromium.org> Reviewed-by: Kenichi Ishibashi <bashi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1426980}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.