Closed Bug 2002034 Opened 1 year ago Closed 1 year ago

Accept-Encoding should include 'dcb' and 'dcz'

Categories

(Core :: Networking: Cache, defect, P3)

Firefox 147
defect

Tracking

()

RESOLVED FIXED
147 Branch
Tracking Status
firefox147 --- fixed

People

(Reporter: louis.vancraen, Assigned: jesup, NeedInfo)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(3 external files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36

Steps to reproduce:

I visited the site: https://fireclown.myshopify.com/cart/31358403117112:1.
I then added a header to fetch a specific version of this site.
I reloaded the site.
In Chrome, I receive 'dcb' encoded assets. In Firefox, I receive 'br' encoded assets.

Actual results:

I received brotli ('br') encoded assets.
The "Accept-Encoding" was 'gzip, deflate, br, zstd'.

Expected results:

I expected to receive dictionary compressed brotli ('dcb') encoded assets.
I expected the "Accept-Encoding" to be 'gzip, deflate, br, zstd, dcb, dcz'.

The Bugbug bot thinks this bug should belong to the 'Core::Internationalization' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Internationalization
Product: Firefox → Core
Component: Internationalization → Networking

What version of firefox are you using? Compression Dictionaries are only supported right now in Nightly (147). We hope to let it go to beta and then release in 147, but that decision hasn't been made yet.
We will send an Accept-Encoding with dcb and dcz if we have a stored dictionary for that resource being fetched (but only in that case), when we also will send an Available-Dictionary header. If there's no dictionary for a match value (and match-id) that would apply to the resource, we won't send Available-Dictionary (or dcb/dcz Accept-Encoding).
I know shopify is using dictionaries, but my understanding is they only use it for checkout flows (which your url may be)

Severity: -- → S3
Flags: needinfo?(louis.vancraen)
Priority: -- → P3
Whiteboard: [necko-triaged]

Sorry, I should've specified. I'm using the Nightly version 147.0a1 (2025-11-21).

This is indeed a checkout flow on a Shopify store.

Is there a way for me to see what's in the dictionary? (a la Chrome's chrome://net-internals/#sharedDictionary)

Flags: needinfo?(louis.vancraen)

You can check if there are dictionaries saved by looking in about:cache for "dict:" entries:
about:cache-entry?storage=disk&context=&eid=dict:&uri=https://shop.app/
should show you the shopify dictionaries

Looking at that URL, I see match= patterns of things like app.*.js. This does not match https://shop.app/cdn/shopifycloud/checkout-web/assets/c1/app.d3ZVRK4C.js for example, because when combined with https://shop.com/ (per the spec), it would only match things in the root of shop.com. To match https://shop.app/cdn/shopifycloud/checkout-web/assets/c1/app.d3ZVRK4C.js it would need to be something like match=/*/app.*.js (or even match=/*app.*.js)

I suspect this is a bug in Chrome which shopify has accidentally required

See also https://urlpattern.com/

Also about:cache-entry?storage=disk&context=&eid=dict:&uri=https://checkout.shopify.com/

This is due to not passing the mURI for the DictionaryCacheEntry to URLPattern. The WPT tests don't cover patterns or the interface between URLPattern and Compression Dictionaries well. The case is covered in the spec in 2.2.2, step 2

Assignee: nobody → rjesup
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by rjesup@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/96b287d65272 https://hg.mozilla.org/integration/autoland/rev/ada7745c26cf When matching for CompressionDictionaries pass the cache entry URI to URLPattern r=necko-reviewers,valentin
Pushed by agoloman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9e0bc1a5ccb3 https://hg.mozilla.org/integration/autoland/rev/7d03596f5d7a Revert "Bug 2002034: When matching for CompressionDictionaries pass the cache entry URI to URLPattern r=necko-reviewers,valentin" for causing xpc faliures @test_dictionary_compression_dcb.js.

Backed out for causing xpc faliures @test_dictionary_compression_dcb.js.

Flags: needinfo?(rjesup)
Pushed by rjesup@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/baecbcec1afd https://hg.mozilla.org/integration/autoland/rev/51c9cbe2f790 When matching for CompressionDictionaries pass the cache entry URI to URLPattern r=necko-reviewers,valentin
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/326110ddbd20 https://hg.mozilla.org/integration/autoland/rev/35961df57743 Revert "Bug 2002034: When matching for CompressionDictionaries pass the cache entry URI to URLPattern r=necko-reviewers,valentin" for causing xpc failures at test_dictionary_compression_dcb.js.
Pushed by rjesup@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/fba50614bc36 https://hg.mozilla.org/integration/autoland/rev/d9828f771202 When matching for CompressionDictionaries pass the cache entry URI to URLPattern r=necko-reviewers,valentin,kershaw
Pushed by chorotan@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d0ede5b6f046 https://hg.mozilla.org/integration/autoland/rev/9e123fe48f4c Fix handling of paths for compression dictionaries in storage test r=#necko-reviewers!
QA Whiteboard: [qa-triage-done-c148/b147]
Regressions: 2009774
Component: Networking → Networking: Cache
No longer regressions: 2009774
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: