1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-05-08 11:33:04 +00:00

Compare commits

...

5 commits

Author SHA1 Message Date
Armand Mégrot 4b20ae0b69
Merge 5dcad17a61 into ba7fd048b6 2024-04-16 20:07:02 -04:00
dependabot[bot] ba7fd048b6
build(deps): bump codecov/codecov-action from 4.2.0 to 4.3.0 (#3331)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4.2.0...v4.3.0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 01:02:44 +00:00
dependabot[bot] d98938b125
build(deps): bump taiki-e/install-action from 2.32.9 to 2.32.17 (#3332)
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.32.9 to 2.32.17.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/v2.32.9...v2.32.17)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 01:02:30 +00:00
Armand Mégrot 5dcad17a61
Merge branch 'master' into master 2023-09-12 10:51:58 +02:00
Armand Mégrot 5f1a4607e5
fix response body when no content-length header 2023-05-20 13:30:46 +02:00
7 changed files with 26 additions and 10 deletions

View file

@ -45,7 +45,7 @@ jobs:
toolchain: ${{ matrix.version.version }}
- 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:
tool: cargo-hack,cargo-ci-cache-clean
@ -88,7 +88,7 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
- name: Install cargo-hack
uses: taiki-e/install-action@v2.32.9
uses: taiki-e/install-action@v2.32.17
with:
tool: cargo-hack
@ -109,7 +109,7 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
- name: Install nextest
uses: taiki-e/install-action@v2.32.9
uses: taiki-e/install-action@v2.32.17
with:
tool: nextest

View file

@ -50,7 +50,7 @@ jobs:
toolchain: ${{ matrix.version.version }}
- 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:
tool: cargo-hack,cargo-ci-cache-clean

View file

@ -23,7 +23,7 @@ jobs:
components: llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2.32.9
uses: taiki-e/install-action@v2.32.17
with:
tool: cargo-llvm-cov
@ -31,7 +31,7 @@ jobs:
run: cargo llvm-cov --workspace --all-features --codecov --output-path codecov.json
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.2.0
uses: codecov/codecov-action@v4.3.0
with:
files: codecov.json
fail_ci_if_error: true

View file

@ -82,7 +82,7 @@ jobs:
toolchain: nightly-2023-08-25
- name: Install cargo-public-api
uses: taiki-e/install-action@v2.32.9
uses: taiki-e/install-action@v2.32.17
with:
tool: cargo-public-api

View file

@ -47,6 +47,10 @@
- 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
### Fixed

View file

@ -391,8 +391,20 @@ impl MessageType for ResponseHead {
// switching protocol or connect
PayloadType::Stream(PayloadDecoder::eof())
} else {
// for HTTP/1.0 read to eof and close connection
if msg.version == Version::HTTP_10 {
let body_allowed = match msg.status.as_u16() {
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);
PayloadType::Payload(PayloadDecoder::eof())
} else {

View file

@ -761,7 +761,7 @@ async fn client_unread_response() {
// awc does not read all bytes unless content-length is specified
let bytes = res.body().await.unwrap();
assert_eq!(bytes, Bytes::from_static(b""));
assert_eq!(bytes, Bytes::from_static(b"welcome!"));
}
#[actix_rt::test]