mirror of
https://github.com/servo/servo.git
synced 2025-07-22 06:43:40 +01:00
Auto merge of #12050 - johannhof:brotli, r=jdm
Switch to a faster Brotli crate <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #11933. <!-- Either: --> - [x] These changes do not require tests (I hope) because no new behavior was introduced <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12050) <!-- Reviewable:end -->
This commit is contained in:
commit
c8b048e368
4 changed files with 24 additions and 8 deletions
|
@ -10,7 +10,7 @@ path = "lib.rs"
|
|||
|
||||
[dependencies]
|
||||
bitflags = "0.7"
|
||||
brotli = {git = "https://github.com/ende76/brotli-rs"}
|
||||
brotli = "1.0.6"
|
||||
content-blocker = "0.2"
|
||||
cookie = { version = "0.2.5", features = ["serialize-serde", "serialize-rustc" ] }
|
||||
device = {git = "https://github.com/servo/devices"}
|
||||
|
|
|
@ -570,7 +570,7 @@ impl StreamedResponse {
|
|||
Decoder::Deflate(DeflateDecoder::new(response))
|
||||
}
|
||||
Some(Encoding::EncodingExt(ref ext)) if ext == "br" => {
|
||||
Decoder::Brotli(Decompressor::new(response))
|
||||
Decoder::Brotli(Decompressor::new(response, 1024))
|
||||
}
|
||||
_ => {
|
||||
Decoder::Plain(response)
|
||||
|
|
14
components/servo/Cargo.lock
generated
14
components/servo/Cargo.lock
generated
|
@ -57,6 +57,11 @@ dependencies = [
|
|||
"memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "alloc-no-stdlib"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "android_glue"
|
||||
version = "0.1.3"
|
||||
|
@ -184,8 +189,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "brotli"
|
||||
version = "0.3.23"
|
||||
source = "git+https://github.com/ende76/brotli-rs#d8507fd07e9fa57ed8251d5dc500dcd62df62c7c"
|
||||
version = "1.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"alloc-no-stdlib 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "browserhtml"
|
||||
|
@ -1391,7 +1399,7 @@ name = "net"
|
|||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"brotli 0.3.23 (git+https://github.com/ende76/brotli-rs)",
|
||||
"brotli 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"content-blocker 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"device 0.0.1 (git+https://github.com/servo/devices)",
|
||||
|
|
14
ports/cef/Cargo.lock
generated
14
ports/cef/Cargo.lock
generated
|
@ -31,6 +31,11 @@ dependencies = [
|
|||
"memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "alloc-no-stdlib"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "android_glue"
|
||||
version = "0.1.3"
|
||||
|
@ -158,8 +163,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "brotli"
|
||||
version = "0.3.23"
|
||||
source = "git+https://github.com/ende76/brotli-rs#d8507fd07e9fa57ed8251d5dc500dcd62df62c7c"
|
||||
version = "1.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"alloc-no-stdlib 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "browserhtml"
|
||||
|
@ -1293,7 +1301,7 @@ name = "net"
|
|||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"brotli 0.3.23 (git+https://github.com/ende76/brotli-rs)",
|
||||
"brotli 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"content-blocker 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"device 0.0.1 (git+https://github.com/servo/devices)",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue