mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-13 21:53:59 +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
|
||||
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
|
||||
|
||||
ci_feature_powerset_check:
|
||||
|
@ -2,6 +2,12 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
## 3.5.1
|
||||
|
||||
## Fixed
|
||||
|
||||
- Prevent hang when returning zero-sized response bodies through compression layer.
|
||||
|
||||
## 3.5.0
|
||||
|
||||
### Changed
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "actix-http"
|
||||
version = "3.5.0"
|
||||
version = "3.5.1"
|
||||
authors = [
|
||||
"Nikolay Kim <fafhrd91@gmail.com>",
|
||||
"Rob Ede <robjtede@icloud.com>",
|
||||
|
@ -5,11 +5,11 @@
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
[](https://crates.io/crates/actix-http)
|
||||
[](https://docs.rs/actix-http/3.5.0)
|
||||
[](https://docs.rs/actix-http/3.5.1)
|
||||

|
||||

|
||||
<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://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 {
|
||||
// no need to compress an empty body
|
||||
if matches!(body.size(), BodySize::None | BodySize::Sized(0)) {
|
||||
return Self::none();
|
||||
// no need to compress empty bodies
|
||||
match body.size() {
|
||||
BodySize::None => return Self::none(),
|
||||
BodySize::Sized(0) => return Self::empty(),
|
||||
_ => {}
|
||||
}
|
||||
|
||||
let should_encode = !(head.headers().contains_key(&CONTENT_ENCODING)
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
## 0.5.2
|
||||
|
||||
- Minimum supported Rust version (MSRV) is now 1.68 due to transitive `time` dependency.
|
||||
|
||||
## 0.5.1
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "actix-router"
|
||||
version = "0.5.1"
|
||||
version = "0.5.2"
|
||||
authors = [
|
||||
"Nikolay Kim <fafhrd91@gmail.com>",
|
||||
"Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>",
|
||||
|
@ -1,11 +1,11 @@
|
||||
# `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 />
|
||||
[](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://discord.gg/NWpN5mmg3x)
|
||||
|
||||
|
Reference in New Issue
Block a user