mirror of https://github.com/fafhrd91/actix-web
Compare commits
7 Commits
f63cf69e6a
...
cede0c6dbb
Author | SHA1 | Date |
---|---|---|
|
cede0c6dbb | |
|
1005b6a12a | |
|
d898e8f739 | |
|
353873fc04 | |
|
1390e29705 | |
|
c6e7ebd185 | |
|
e8351cc3aa |
|
@ -49,7 +49,7 @@ jobs:
|
|||
toolchain: ${{ matrix.version.version }}
|
||||
|
||||
- name: Install just, cargo-hack, cargo-nextest, cargo-ci-cache-clean
|
||||
uses: taiki-e/install-action@v2.49.10
|
||||
uses: taiki-e/install-action@v2.49.17
|
||||
with:
|
||||
tool: just,cargo-hack,cargo-nextest,cargo-ci-cache-clean
|
||||
|
||||
|
@ -83,7 +83,7 @@ jobs:
|
|||
uses: actions-rust-lang/setup-rust-toolchain@v1.11.0
|
||||
|
||||
- name: Install just, cargo-hack
|
||||
uses: taiki-e/install-action@v2.49.10
|
||||
uses: taiki-e/install-action@v2.49.17
|
||||
with:
|
||||
tool: just,cargo-hack
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ jobs:
|
|||
toolchain: ${{ matrix.version.version }}
|
||||
|
||||
- name: Install just, cargo-hack, cargo-nextest, cargo-ci-cache-clean
|
||||
uses: taiki-e/install-action@v2.49.10
|
||||
uses: taiki-e/install-action@v2.49.17
|
||||
with:
|
||||
tool: just,cargo-hack,cargo-nextest,cargo-ci-cache-clean
|
||||
|
||||
|
@ -113,7 +113,7 @@ jobs:
|
|||
toolchain: nightly
|
||||
|
||||
- name: Install just
|
||||
uses: taiki-e/install-action@v2.49.10
|
||||
uses: taiki-e/install-action@v2.49.17
|
||||
with:
|
||||
tool: just
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ jobs:
|
|||
components: llvm-tools
|
||||
|
||||
- name: Install just, cargo-llvm-cov, cargo-nextest
|
||||
uses: taiki-e/install-action@v2.49.10
|
||||
uses: taiki-e/install-action@v2.49.17
|
||||
with:
|
||||
tool: just,cargo-llvm-cov,cargo-nextest
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ jobs:
|
|||
toolchain: ${{ vars.RUST_VERSION_EXTERNAL_TYPES }}
|
||||
|
||||
- name: Install just
|
||||
uses: taiki-e/install-action@v2.49.10
|
||||
uses: taiki-e/install-action@v2.49.17
|
||||
with:
|
||||
tool: just
|
||||
|
||||
|
|
|
@ -2,6 +2,14 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
## 4.10.2
|
||||
|
||||
- No significant changes since `4.10.1`.
|
||||
|
||||
## 4.10.1
|
||||
|
||||
- No significant changes since `4.10.0`.
|
||||
|
||||
## 4.10.0
|
||||
|
||||
### Added
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "actix-web"
|
||||
version = "4.10.0"
|
||||
version = "4.10.2"
|
||||
description = "Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust"
|
||||
authors = [
|
||||
"Nikolay Kim <fafhrd91@gmail.com>",
|
||||
|
@ -137,7 +137,7 @@ actix-service = "2"
|
|||
actix-utils = "3"
|
||||
actix-tls = { version = "3.4", default-features = false, optional = true }
|
||||
|
||||
actix-http = { version = "3.7", features = ["ws"] }
|
||||
actix-http = { version = "3.10", features = ["ws"] }
|
||||
actix-router = { version = "0.5.3", default-features = false, features = ["http"] }
|
||||
actix-web-codegen = { version = "4.3", optional = true, default-features = false }
|
||||
|
||||
|
@ -145,7 +145,7 @@ bytes = "1"
|
|||
bytestring = "1"
|
||||
cfg-if = "1"
|
||||
cookie = { version = "0.16", features = ["percent-encode"], optional = true }
|
||||
derive_more = { version = "2", features = ["display", "error", "from"] }
|
||||
derive_more = { version = "2", features = ["as_ref", "deref", "deref_mut", "display", "error", "from"] }
|
||||
encoding_rs = "0.8"
|
||||
foldhash = "0.1"
|
||||
futures-core = { version = "0.3.17", default-features = false }
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
<!-- prettier-ignore-start -->
|
||||
|
||||
[](https://crates.io/crates/actix-web)
|
||||
[](https://docs.rs/actix-web/4.10.0)
|
||||
[](https://docs.rs/actix-web/4.10.2)
|
||||

|
||||

|
||||
[](https://deps.rs/crate/actix-web/4.10.0)
|
||||
[](https://deps.rs/crate/actix-web/4.10.2)
|
||||
<br />
|
||||
[](https://github.com/actix/actix-web/actions/workflows/ci.yml)
|
||||
[](https://codecov.io/gh/actix/actix-web)
|
||||
|
|
|
@ -238,7 +238,7 @@ where
|
|||
match res {
|
||||
Ok(bytes) => {
|
||||
let fallback = bytes.clone();
|
||||
let left = L::from_request(this.req, &mut payload_from_bytes(bytes));
|
||||
let left = L::from_request(this.req, &mut dev::Payload::from(bytes));
|
||||
EitherExtractState::Left { left, fallback }
|
||||
}
|
||||
Err(err) => break Err(EitherExtractError::Bytes(err)),
|
||||
|
@ -251,7 +251,7 @@ where
|
|||
Err(left_err) => {
|
||||
let right = R::from_request(
|
||||
this.req,
|
||||
&mut payload_from_bytes(mem::take(fallback)),
|
||||
&mut dev::Payload::from(mem::take(fallback)),
|
||||
);
|
||||
EitherExtractState::Right {
|
||||
left_err: Some(left_err),
|
||||
|
@ -276,12 +276,6 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
fn payload_from_bytes(bytes: Bytes) -> dev::Payload {
|
||||
let (_, mut h1_payload) = actix_http::h1::Payload::create(true);
|
||||
h1_payload.unread_data(bytes);
|
||||
dev::Payload::from(h1_payload)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
|
|
@ -98,7 +98,7 @@ dangerous-h2c = []
|
|||
[dependencies]
|
||||
actix-codec = "0.5"
|
||||
actix-service = "2"
|
||||
actix-http = { version = "3.7", features = ["http2", "ws"] }
|
||||
actix-http = { version = "3.10", features = ["http2", "ws"] }
|
||||
actix-rt = { version = "2.1", default-features = false }
|
||||
actix-tls = { version = "3.4", features = ["connect", "uri"] }
|
||||
actix-utils = "3"
|
||||
|
|
|
@ -89,9 +89,9 @@ impl Connector<()> {
|
|||
/// # Panics
|
||||
///
|
||||
/// - When the `rustls-0_23-webpki-roots` or `rustls-0_23-native-roots` features are enabled
|
||||
/// and no default crypto provider has been loaded, this method will panic.
|
||||
/// and no default crypto provider has been loaded, this method will panic.
|
||||
/// - When the `rustls-0_23-native-roots` or `rustls-0_22-native-roots` features are enabled
|
||||
/// and the runtime system has no native root certificates, this method will panic.
|
||||
/// and the runtime system has no native root certificates, this method will panic.
|
||||
#[allow(clippy::new_ret_no_self, clippy::let_unit_value)]
|
||||
pub fn new() -> Connector<
|
||||
impl Service<
|
||||
|
|
|
@ -65,9 +65,7 @@ impl TestResponse {
|
|||
|
||||
/// Set response's payload
|
||||
pub fn set_payload<B: Into<Bytes>>(mut self, data: B) -> Self {
|
||||
let (_, mut payload) = h1::Payload::create(true);
|
||||
payload.unread_data(data.into());
|
||||
self.payload = Some(payload.into());
|
||||
self.payload = Some(Payload::from(data.into()));
|
||||
self
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue