mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update flate2 to 1.0
This commit is contained in:
parent
9ca18b510f
commit
c072829be0
4 changed files with 7 additions and 7 deletions
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -879,7 +879,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "flate2"
|
name = "flate2"
|
||||||
version = "0.2.19"
|
version = "1.0.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1814,7 +1814,7 @@ dependencies = [
|
||||||
"brotli 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"brotli 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"devtools_traits 0.0.1",
|
"devtools_traits 0.0.1",
|
||||||
"flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
"flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"hyper-openssl 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hyper-openssl 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"hyper_serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"hyper_serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -3652,7 +3652,7 @@ dependencies = [
|
||||||
"checksum error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8"
|
"checksum error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8"
|
||||||
"checksum euclid 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b2744c002882c67d0f6d6e8cfdf16eae729dc27744d312745132e62218b7de5c"
|
"checksum euclid 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b2744c002882c67d0f6d6e8cfdf16eae729dc27744d312745132e62218b7de5c"
|
||||||
"checksum expat-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c470ccb972f2088549b023db8029ed9da9426f5affbf9b62efff7009ab8ed5b1"
|
"checksum expat-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c470ccb972f2088549b023db8029ed9da9426f5affbf9b62efff7009ab8ed5b1"
|
||||||
"checksum flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)" = "36df0166e856739905cd3d7e0b210fe818592211a008862599845e012d8d304c"
|
"checksum flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fac2277e84e5e858483756647a9d0aa8d9a2b7cba517fd84325a0aaa69a0909"
|
||||||
"checksum fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344"
|
"checksum fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344"
|
||||||
"checksum fontsan 0.4.0 (git+https://github.com/servo/fontsan)" = "<none>"
|
"checksum fontsan 0.4.0 (git+https://github.com/servo/fontsan)" = "<none>"
|
||||||
"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
|
"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
|
||||||
|
|
|
@ -16,7 +16,7 @@ base64 = "0.6"
|
||||||
brotli = "1.0.6"
|
brotli = "1.0.6"
|
||||||
cookie = "0.10"
|
cookie = "0.10"
|
||||||
devtools_traits = {path = "../devtools_traits"}
|
devtools_traits = {path = "../devtools_traits"}
|
||||||
flate2 = "0.2.0"
|
flate2 = "1"
|
||||||
hyper = "0.10"
|
hyper = "0.10"
|
||||||
hyper_serde = "0.8"
|
hyper_serde = "0.8"
|
||||||
hyper-openssl = "0.2.2"
|
hyper-openssl = "0.2.2"
|
||||||
|
|
|
@ -290,7 +290,7 @@ impl StreamedResponse {
|
||||||
let decoder = {
|
let decoder = {
|
||||||
if let Some(ref encoding) = response.headers.get::<ContentEncoding>().cloned() {
|
if let Some(ref encoding) = response.headers.get::<ContentEncoding>().cloned() {
|
||||||
if encoding.contains(&Encoding::Gzip) {
|
if encoding.contains(&Encoding::Gzip) {
|
||||||
Decoder::Gzip(GzDecoder::new(response)?)
|
Decoder::Gzip(GzDecoder::new(response))
|
||||||
}
|
}
|
||||||
else if encoding.contains(&Encoding::Deflate) {
|
else if encoding.contains(&Encoding::Deflate) {
|
||||||
Decoder::Deflate(DeflateDecoder::new(response))
|
Decoder::Deflate(DeflateDecoder::new(response))
|
||||||
|
|
|
@ -394,7 +394,7 @@ fn test_load_when_redirecting_from_a_post_should_rewrite_next_request_as_get() {
|
||||||
fn test_load_should_decode_the_response_as_deflate_when_response_headers_have_content_encoding_deflate() {
|
fn test_load_should_decode_the_response_as_deflate_when_response_headers_have_content_encoding_deflate() {
|
||||||
let handler = move |_: HyperRequest, mut response: HyperResponse| {
|
let handler = move |_: HyperRequest, mut response: HyperResponse| {
|
||||||
response.headers_mut().set(ContentEncoding(vec![Encoding::Deflate]));
|
response.headers_mut().set(ContentEncoding(vec![Encoding::Deflate]));
|
||||||
let mut e = DeflateEncoder::new(Vec::new(), Compression::Default);
|
let mut e = DeflateEncoder::new(Vec::new(), Compression::default());
|
||||||
e.write(b"Yay!").unwrap();
|
e.write(b"Yay!").unwrap();
|
||||||
let encoded_content = e.finish().unwrap();
|
let encoded_content = e.finish().unwrap();
|
||||||
response.send(&encoded_content).unwrap();
|
response.send(&encoded_content).unwrap();
|
||||||
|
@ -424,7 +424,7 @@ fn test_load_should_decode_the_response_as_deflate_when_response_headers_have_co
|
||||||
fn test_load_should_decode_the_response_as_gzip_when_response_headers_have_content_encoding_gzip() {
|
fn test_load_should_decode_the_response_as_gzip_when_response_headers_have_content_encoding_gzip() {
|
||||||
let handler = move |_: HyperRequest, mut response: HyperResponse| {
|
let handler = move |_: HyperRequest, mut response: HyperResponse| {
|
||||||
response.headers_mut().set(ContentEncoding(vec![Encoding::Gzip]));
|
response.headers_mut().set(ContentEncoding(vec![Encoding::Gzip]));
|
||||||
let mut e = GzEncoder::new(Vec::new(), Compression::Default);
|
let mut e = GzEncoder::new(Vec::new(), Compression::default());
|
||||||
e.write(b"Yay!").unwrap();
|
e.write(b"Yay!").unwrap();
|
||||||
let encoded_content = e.finish().unwrap();
|
let encoded_content = e.finish().unwrap();
|
||||||
response.send(&encoded_content).unwrap();
|
response.send(&encoded_content).unwrap();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue