The spec of Compression Dictionary Transport has been changed to use
new `dcb` and `dcz` content encodings.
https://github.com/httpwg/http-extensions/pull/2784
To follow the spec change, this CL changes the Chromium implementation
and tests as follows:
- Use "dcb" content encoding name instead of "br-d".
- Use "dcz" content encoding name instead of "zstd-d".
- Remove the "Content-Dictionary" response header.
- Check the magic number and the sha256 hash in the head of the
Dictionary-Compressed streams using
SharedDictionaryHeaderCheckerSourceStream.
- Re-generate test files using the new content encodings.
Bug: 1413922
Change-Id: I4f2f40c1f0c3666b4f0b54e34ad966ffccadd96b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5552563
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Patrick Meenan <pmeenan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1304826}
Currently Chromium is using `dictionary` link rel attribute for fetching
compression dictionaries. But in the new spec of Compression Dictionary
Transport [1], `compression-dictionary` is used for link rel attribute.
So this CL changes the Chromium code to use `compression-dictionary` for
link rel attribute.
Note: This change is a breaking change. But this feature is not enabled
by default yet, and we are not conducting Origin Trial experiment now.
[1] https://datatracker.ietf.org/doc/draft-ietf-httpbis-compression-dictionary/04/
Bug: 40255884
Change-Id: Ie393e22c6b7411568406c55c7b16516f70040dd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5550240
Reviewed-by: Patrick Meenan <pmeenan@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1303739}
The canonical bug format is TODO(crbug.com/<id>). TODOs of the
following forms will all be migrated to the new format:
- TODO(crbug.com/<old id>)
- TODO(https://crbug.com/<old id>)
- TODO(crbug/<old id>)
- TODO(crbug/monorail/<old id>)
- TODO(<old id>)
- TODO(issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/u/1/issues/<old id>)
- TODO(bugs.chromium.org/<old id>)
Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues.
See go/crbug-todo-migration for details.
#crbug-todo-migration
Bug: b/321899722
Change-Id: Ifd155bbeff882ea939f74cf8b8f847f42847940b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5468156
Reviewed-by: Darryl James <dljames@chromium.org>
Owners-Override: Alison Gale <agale@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1290297}
We have completed the implementation of a new V2 backend for the
CompressionDictionaryTransport feature. And we don't need to keep the V1
backend. So this CL removes the V1 backend.
Bug: 1413922
Change-Id: Ifb8e59e9f617d67a9098adfce4f1b4f1b422d06b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5274982
Reviewed-by: Patrick Meenan <pmeenan@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1257871}
After https://crrev.com/c/5248489, Chromium parses "id" and "match-dest"
option of "Use-As-Ditionary" response header. But those information is
not stored in the SQL database. This CL adds the support.
To store the information, the SQL database needs to be updated as
following:
- Change the existing `id` field to `primary_key`.
- Add a new `id` field to store the "id" option.
- Add a new `match_dest` field to store the "match-dest" option.
- Add the `match_dest` to the `unique_index` index.
- Change kCurrentVersionNumber and kCompatibleVersionNumber from 1 to 2.
As the existing database scheme (version 1) is used only for the first
Origin Trial (M119-M122), we don't need to migrate the data from version
1 to the new scheme (version 2). So `DoMigrateDatabaseSchema()` method
just deletes the existing table `dictionaries` and the `total_dict_size`
metadata.
Bug: 1413922
Change-Id: Ia2841e4f022cc48cf766b51639cd7047f6a1bc81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5271881
Reviewed-by: Patrick Meenan <pmeenan@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1257129}
Currently Chromium is using "expires" option in Use-As-Dictionary
response header for the dictionary lifetime. The option name has been
renamed to "ttl" in the spec discussed in IETF HTTPWG.
And the new change in the spac [1] removed this, and the lifetime should
be calculated from the response's freshness [2].
After this CL, when V2 backend is enabled, Chromium will not check
"expires" option, and it will check the response's freshness.
[1]: https://github.com/httpwg/http-extensions/pull/2709
[2]: https://datatracker.ietf.org/doc/html/rfc9111#name-freshness
Bug: 1413922
Change-Id: Idd2cdeb526099a1f2854ea0094541cedc0a64af8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5227360
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1251343}
A new "Content-Dictionary" response header was introduced by this spec
change [1].
When V2 backend is enabled, if the "Content-Encoding" response header
indicates that a dictionary is used, Chrome will check the
"Content-Dictionary" response header. And if there is no such header or
it doesn't match with the value of "Available-Dictionary" request
header, Chrome will treat the response as an error.
[1]: https://github.com/httpwg/http-extensions/pull/2680
Bug: 1413922
Change-Id: I37d09fad1201f4fb4b059d65c4aaee58cec788ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5226641
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1251341}
The latest spec discussed in IETF HTTPWG is using `Available-Dictionary`
request header name instead of `Sec-Available-Dictionary`.
Also in the value is using a Structured Field sf-binary sha256 hash
of the dictionary after [1].
So after this CL, when V2 backend is enabled, Chrome will set
`Available-Dictionary` header with a Structured Field sf-binary sha256 hash of the dictionary.
[1]: https://github.com/httpwg/http-extensions/pull/2680
Bug: 1413922
Change-Id: Ibb716ec27bb8f5d58a5266ad6ac3ec75ad643130
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5224886
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1251259}
We will implement a new behavior of Compression Dictionary Transport
to catch up the spec changes under the new V2 FeatureParam.
Bug: 1413922
Change-Id: Ib7c42f1e9720df047149766b9f3dc155811e57a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5188305
Reviewed-by: Patrick Meenan <pmeenan@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1246260}
We are observing potential issues with CompressionDictionaryTransport
feature that may be caused by network appliances that intercept network
traffic.
To investigate this issue, this CL introduces a new feature flag named
CompressionDictionaryTransportRequireKnownRootCert. If this feature is
enabled, Chromium will use stored shared dictionaries only when the
HTTPS connection's certificate is rooted by a well known root CA or when
the server is localhost.
Bug: 1413922
Change-Id: Iaaa9d4db9d335cde12632925c1e36b2a55a4cf9d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5028336
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1232707}
We are observing potential issues with CompressionDictionaryTransport
feature that may be caused by network appliances that intercept network
traffic.
To mitigate this issue, this CL introduces a new feature flag named
CompressionDictionaryTransportOverHttp1. If this feature is disabled,
Chrome will not use storead dictionary when the connection is using
HTTP/1 for non-localhost requests.
Bug: 1413922
Change-Id: I8e2c8846c4a5b6b5b66e5c27473f1b86c7bd3e2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5048575
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1229835}