mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-23 09:18:20 +02:00
Compare commits
3 Commits
web-v4.4.1
...
http-v3.5.
Author | SHA1 | Date | |
---|---|---|---|
|
f4f459d420 | ||
|
d14e98b62b | ||
|
f4851b3914 |
2
.github/workflows/ci-post-merge.yml
vendored
2
.github/workflows/ci-post-merge.yml
vendored
@@ -71,7 +71,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Clear the cargo caches
|
- name: Clear the cargo caches
|
||||||
run: |
|
run: |
|
||||||
cargo install cargo-cache --version 0.8.3 --no-default-features --features ci-autoclean
|
cargo --locked install cargo-cache --version 0.8.3 --no-default-features --features ci-autoclean
|
||||||
cargo-cache
|
cargo-cache
|
||||||
|
|
||||||
ci_feature_powerset_check:
|
ci_feature_powerset_check:
|
||||||
|
@@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## 3.5.1
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Prevent hang when returning zero-sized response bodies through compression layer.
|
||||||
|
|
||||||
## 3.5.0
|
## 3.5.0
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-http"
|
name = "actix-http"
|
||||||
version = "3.5.0"
|
version = "3.5.1"
|
||||||
authors = [
|
authors = [
|
||||||
"Nikolay Kim <fafhrd91@gmail.com>",
|
"Nikolay Kim <fafhrd91@gmail.com>",
|
||||||
"Rob Ede <robjtede@icloud.com>",
|
"Rob Ede <robjtede@icloud.com>",
|
||||||
|
@@ -5,11 +5,11 @@
|
|||||||
<!-- prettier-ignore-start -->
|
<!-- prettier-ignore-start -->
|
||||||
|
|
||||||
[](https://crates.io/crates/actix-http)
|
[](https://crates.io/crates/actix-http)
|
||||||
[](https://docs.rs/actix-http/3.5.0)
|
[](https://docs.rs/actix-http/3.5.1)
|
||||||

|

|
||||||

|

|
||||||
<br />
|
<br />
|
||||||
[](https://deps.rs/crate/actix-http/3.5.0)
|
[](https://deps.rs/crate/actix-http/3.5.1)
|
||||||
[](https://crates.io/crates/actix-http)
|
[](https://crates.io/crates/actix-http)
|
||||||
[](https://discord.gg/NWpN5mmg3x)
|
[](https://discord.gg/NWpN5mmg3x)
|
||||||
|
|
||||||
|
@@ -50,10 +50,21 @@ impl<B: MessageBody> Encoder<B> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn empty() -> Self {
|
||||||
|
Encoder {
|
||||||
|
body: EncoderBody::Full { body: Bytes::new() },
|
||||||
|
encoder: None,
|
||||||
|
fut: None,
|
||||||
|
eof: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn response(encoding: ContentEncoding, head: &mut ResponseHead, body: B) -> Self {
|
pub fn response(encoding: ContentEncoding, head: &mut ResponseHead, body: B) -> Self {
|
||||||
// no need to compress an empty body
|
// no need to compress empty bodies
|
||||||
if matches!(body.size(), BodySize::None | BodySize::Sized(0)) {
|
match body.size() {
|
||||||
return Self::none();
|
BodySize::None => return Self::none(),
|
||||||
|
BodySize::Sized(0) => return Self::empty(),
|
||||||
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
let should_encode = !(head.headers().contains_key(&CONTENT_ENCODING)
|
let should_encode = !(head.headers().contains_key(&CONTENT_ENCODING)
|
||||||
|
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## 0.5.2
|
||||||
|
|
||||||
- Minimum supported Rust version (MSRV) is now 1.68 due to transitive `time` dependency.
|
- Minimum supported Rust version (MSRV) is now 1.68 due to transitive `time` dependency.
|
||||||
|
|
||||||
## 0.5.1
|
## 0.5.1
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-router"
|
name = "actix-router"
|
||||||
version = "0.5.1"
|
version = "0.5.2"
|
||||||
authors = [
|
authors = [
|
||||||
"Nikolay Kim <fafhrd91@gmail.com>",
|
"Nikolay Kim <fafhrd91@gmail.com>",
|
||||||
"Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>",
|
"Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>",
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
# `actix-router`
|
# `actix-router`
|
||||||
|
|
||||||
[](https://crates.io/crates/actix-router)
|
[](https://crates.io/crates/actix-router)
|
||||||
[](https://docs.rs/actix-router/0.5.1)
|
[](https://docs.rs/actix-router/0.5.2)
|
||||||

|

|
||||||

|

|
||||||
<br />
|
<br />
|
||||||
[](https://deps.rs/crate/actix-router/0.5.1)
|
[](https://deps.rs/crate/actix-router/0.5.2)
|
||||||
[](https://crates.io/crates/actix-router)
|
[](https://crates.io/crates/actix-router)
|
||||||
[](https://discord.gg/NWpN5mmg3x)
|
[](https://discord.gg/NWpN5mmg3x)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user