mirror of
https://github.com/actix/actix-web.git
synced 2024-05-20 01:08:10 +00:00
Compare commits
5 commits
ffdb8c8009
...
4b20ae0b69
Author | SHA1 | Date | |
---|---|---|---|
4b20ae0b69 | |||
ba7fd048b6 | |||
d98938b125 | |||
5dcad17a61 | |||
5f1a4607e5 |
6
.github/workflows/ci-post-merge.yml
vendored
6
.github/workflows/ci-post-merge.yml
vendored
|
@ -45,7 +45,7 @@ jobs:
|
||||||
toolchain: ${{ matrix.version.version }}
|
toolchain: ${{ matrix.version.version }}
|
||||||
|
|
||||||
- name: Install cargo-hack and cargo-ci-cache-clean
|
- name: Install cargo-hack and cargo-ci-cache-clean
|
||||||
uses: taiki-e/install-action@v2.32.9
|
uses: taiki-e/install-action@v2.32.17
|
||||||
with:
|
with:
|
||||||
tool: cargo-hack,cargo-ci-cache-clean
|
tool: cargo-hack,cargo-ci-cache-clean
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ jobs:
|
||||||
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
|
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
|
||||||
|
|
||||||
- name: Install cargo-hack
|
- name: Install cargo-hack
|
||||||
uses: taiki-e/install-action@v2.32.9
|
uses: taiki-e/install-action@v2.32.17
|
||||||
with:
|
with:
|
||||||
tool: cargo-hack
|
tool: cargo-hack
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ jobs:
|
||||||
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
|
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
|
||||||
|
|
||||||
- name: Install nextest
|
- name: Install nextest
|
||||||
uses: taiki-e/install-action@v2.32.9
|
uses: taiki-e/install-action@v2.32.17
|
||||||
with:
|
with:
|
||||||
tool: nextest
|
tool: nextest
|
||||||
|
|
||||||
|
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -50,7 +50,7 @@ jobs:
|
||||||
toolchain: ${{ matrix.version.version }}
|
toolchain: ${{ matrix.version.version }}
|
||||||
|
|
||||||
- name: Install cargo-hack and cargo-ci-cache-clean
|
- name: Install cargo-hack and cargo-ci-cache-clean
|
||||||
uses: taiki-e/install-action@v2.32.9
|
uses: taiki-e/install-action@v2.32.17
|
||||||
with:
|
with:
|
||||||
tool: cargo-hack,cargo-ci-cache-clean
|
tool: cargo-hack,cargo-ci-cache-clean
|
||||||
|
|
||||||
|
|
4
.github/workflows/coverage.yml
vendored
4
.github/workflows/coverage.yml
vendored
|
@ -23,7 +23,7 @@ jobs:
|
||||||
components: llvm-tools-preview
|
components: llvm-tools-preview
|
||||||
|
|
||||||
- name: Install cargo-llvm-cov
|
- name: Install cargo-llvm-cov
|
||||||
uses: taiki-e/install-action@v2.32.9
|
uses: taiki-e/install-action@v2.32.17
|
||||||
with:
|
with:
|
||||||
tool: cargo-llvm-cov
|
tool: cargo-llvm-cov
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ jobs:
|
||||||
run: cargo llvm-cov --workspace --all-features --codecov --output-path codecov.json
|
run: cargo llvm-cov --workspace --all-features --codecov --output-path codecov.json
|
||||||
|
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
uses: codecov/codecov-action@v4.2.0
|
uses: codecov/codecov-action@v4.3.0
|
||||||
with:
|
with:
|
||||||
files: codecov.json
|
files: codecov.json
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
|
|
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
|
@ -82,7 +82,7 @@ jobs:
|
||||||
toolchain: nightly-2023-08-25
|
toolchain: nightly-2023-08-25
|
||||||
|
|
||||||
- name: Install cargo-public-api
|
- name: Install cargo-public-api
|
||||||
uses: taiki-e/install-action@v2.32.9
|
uses: taiki-e/install-action@v2.32.17
|
||||||
with:
|
with:
|
||||||
tool: cargo-public-api
|
tool: cargo-public-api
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,10 @@
|
||||||
|
|
||||||
- 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.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix `MessageType::set_headers` not using the correct payload decoder when Transfer-Encoding and Content-Length are absent.
|
||||||
|
|
||||||
## 3.3.1
|
## 3.3.1
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -391,8 +391,20 @@ impl MessageType for ResponseHead {
|
||||||
// switching protocol or connect
|
// switching protocol or connect
|
||||||
PayloadType::Stream(PayloadDecoder::eof())
|
PayloadType::Stream(PayloadDecoder::eof())
|
||||||
} else {
|
} else {
|
||||||
// for HTTP/1.0 read to eof and close connection
|
let body_allowed = match msg.status.as_u16() {
|
||||||
if msg.version == Version::HTTP_10 {
|
100..=199 => false,
|
||||||
|
204 => false,
|
||||||
|
304 => false,
|
||||||
|
_ => true,
|
||||||
|
};
|
||||||
|
// for HTTP/1.0 and HTTP/1.1 read to eof and close connection
|
||||||
|
if msg.version == Version::HTTP_11 && body_allowed {
|
||||||
|
if let Some(ConnectionType::Close) = msg.conn_type() {
|
||||||
|
PayloadType::Payload(PayloadDecoder::eof())
|
||||||
|
} else {
|
||||||
|
PayloadType::None
|
||||||
|
}
|
||||||
|
} else if msg.version == Version::HTTP_10 {
|
||||||
msg.set_connection_type(ConnectionType::Close);
|
msg.set_connection_type(ConnectionType::Close);
|
||||||
PayloadType::Payload(PayloadDecoder::eof())
|
PayloadType::Payload(PayloadDecoder::eof())
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -761,7 +761,7 @@ async fn client_unread_response() {
|
||||||
|
|
||||||
// awc does not read all bytes unless content-length is specified
|
// awc does not read all bytes unless content-length is specified
|
||||||
let bytes = res.body().await.unwrap();
|
let bytes = res.body().await.unwrap();
|
||||||
assert_eq!(bytes, Bytes::from_static(b""));
|
assert_eq!(bytes, Bytes::from_static(b"welcome!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
|
|
Loading…
Reference in a new issue