commit | 8e7903206f9a08432d752a0b49a0b2e65aa672e7 | [log] [tgz] |
---|---|---|
author | Etienne Noel <[email protected]> | Tue Nov 08 19:19:18 2022 |
committer | Chromium LUCI CQ <[email protected]> | Tue Nov 08 19:19:18 2022 |
tree | a69797c232c142e884c443f5d0d6562aa7fffe65 | |
parent | ecf0af68300b4014770cd8c7c271b468cb59aac8 [diff] |
CacheStorage now keeps the fragment in the Request URL but doesn't save it in the Cache key. The Cache storage now keeps in the Request Metadata, the complete URL (including the fragment). However, when doing the match, the fragment part is removed. This means that these 3 example URLs will all match: https://example.com/path https://example.com/path#ref https://example.com/path#ref2 The latest url put in the cache will be the one saved and returned in the Request. The specifications (https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm) states that the cached URL should be the request URL and no where is it specified that the fragment should be removed from the cachedURL: "Let cachedURL be request’s url" However, it is specified that during matching, the fragment should be excluded: "If queryURL does not equal cachedURL with the exclude fragment flag set". ---- This CL modified the following: - `third_party/blink/renderer/core/fetch/request.h` The `removeFragment` parameter was added to the `CreateFetchAPIRequest( bool removeFragment = true)` and by default, for retro-compatibility reasons, the fragment is removed. Once we are certain that always keeping the fragment doesn't cause any side-effects, we can change this behaviour and just remove the code that was removing the fragment. - Methods to support manipulating fragments (ref) and their unit tests were also added. - The cache now saves the url in the request metadata so modifications to the proto file were made. Bug: 1205111 Change-Id: Ib23fd5a9364bc64159a2859dc9fd9d3512697202 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3859817 Reviewed-by: Charlie Harrison <[email protected]> Commit-Queue: Etienne Noël <[email protected]> Reviewed-by: Joshua Bell <[email protected]> Reviewed-by: Oriol Brufau <[email protected]> Reviewed-by: Maks Orlovich <[email protected]> Reviewed-by: Finnur Thorarinsson <[email protected]> Reviewed-by: Yaron Friedman <[email protected]> Reviewed-by: Mitsuru Oshima <[email protected]> Cr-Commit-Position: refs/heads/main@{#1068711}
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.