Compare commits

...

8 Commits

Author SHA1 Message Date
dependabot[bot] 6f5b81d2a0
build(deps): bump codecov/codecov-action from 5.3.1 to 5.4.0 (#647)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.3.1 to 5.4.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/v5.3.1...v5.4.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>
2025-03-08 18:07:04 +00:00
dependabot[bot] 4cf37171b5
build(deps): bump actions-rust-lang/setup-rust-toolchain (#645)
Bumps [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain) from 1.10.1 to 1.11.0.
- [Release notes](https://github.com/actions-rust-lang/setup-rust-toolchain/releases)
- [Changelog](https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.10.1...v1.11.0)

---
updated-dependencies:
- dependency-name: actions-rust-lang/setup-rust-toolchain
  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>
2025-03-08 18:02:05 +00:00
dependabot[bot] 00f40e1471
build(deps): bump taiki-e/install-action from 2.49.1 to 2.49.11 (#646)
* build(deps): bump taiki-e/install-action from 2.49.1 to 2.49.11

Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.49.1 to 2.49.11.
- [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.49.1...v2.49.11)

---
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>

* ci: fix msrv

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rob Ede <robjtede@icloud.com>
2025-03-08 17:52:46 +00:00
Rob Ede 15f0b63492
test: fix panic in tokio stream construction 2025-03-08 17:37:40 +00:00
Rob Ede 9d4b1673aa
chore(actix-server): prepare release 2.5.1 2025-03-08 17:32:46 +00:00
Rob Ede fc902b2d56
chore: check lockfile in 2025-03-08 17:24:28 +00:00
Rob Ede f4175a4ad4
chore: fix doc recipe 2025-03-08 17:24:28 +00:00
Rob Ede 323a2e2931
fix(server): fix panic in test server 2025-03-08 17:24:28 +00:00
12 changed files with 2956 additions and 22 deletions

View File

@ -59,12 +59,12 @@ jobs:
echo "RUSTFLAGS=-C target-feature=+crt-static" >> $GITHUB_ENV echo "RUSTFLAGS=-C target-feature=+crt-static" >> $GITHUB_ENV
- name: Install Rust (${{ matrix.version }}) - name: Install Rust (${{ matrix.version }})
uses: actions-rust-lang/setup-rust-toolchain@v1.10.1 uses: actions-rust-lang/setup-rust-toolchain@v1.11.0
with: with:
toolchain: ${{ matrix.version }} toolchain: ${{ matrix.version }}
- name: Install just, cargo-hack, cargo-nextest, cargo-ci-cache-clean - name: Install just, cargo-hack, cargo-nextest, cargo-ci-cache-clean
uses: taiki-e/install-action@v2.49.1 uses: taiki-e/install-action@v2.49.11
with: with:
tool: just,cargo-hack,cargo-nextest,cargo-ci-cache-clean tool: just,cargo-hack,cargo-nextest,cargo-ci-cache-clean
@ -116,12 +116,12 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install Rust (nightly) - name: Install Rust (nightly)
uses: actions-rust-lang/setup-rust-toolchain@v1.10.1 uses: actions-rust-lang/setup-rust-toolchain@v1.11.0
with: with:
toolchain: nightly toolchain: nightly
- name: Install cargo-hack & cargo-minimal-versions - name: Install cargo-hack & cargo-minimal-versions
uses: taiki-e/install-action@v2.49.1 uses: taiki-e/install-action@v2.49.11
with: with:
tool: cargo-hack,cargo-minimal-versions tool: cargo-hack,cargo-minimal-versions

View File

@ -68,12 +68,12 @@ jobs:
echo "RUSTFLAGS=-C target-feature=+crt-static" >> $GITHUB_ENV echo "RUSTFLAGS=-C target-feature=+crt-static" >> $GITHUB_ENV
- name: Install Rust (${{ matrix.version.name }}) - name: Install Rust (${{ matrix.version.name }})
uses: actions-rust-lang/setup-rust-toolchain@v1.10.1 uses: actions-rust-lang/setup-rust-toolchain@v1.11.0
with: with:
toolchain: ${{ matrix.version.version }} toolchain: ${{ matrix.version.version }}
- name: Install just, cargo-hack, cargo-nextest, cargo-ci-cache-clean - name: Install just, cargo-hack, cargo-nextest, cargo-ci-cache-clean
uses: taiki-e/install-action@v2.49.1 uses: taiki-e/install-action@v2.49.11
with: with:
tool: just,cargo-hack,cargo-nextest,cargo-ci-cache-clean tool: just,cargo-hack,cargo-nextest,cargo-ci-cache-clean
@ -120,12 +120,12 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install Rust (nightly) - name: Install Rust (nightly)
uses: actions-rust-lang/setup-rust-toolchain@v1.10.1 uses: actions-rust-lang/setup-rust-toolchain@v1.11.0
with: with:
toolchain: nightly toolchain: nightly
- name: Install just - name: Install just
uses: taiki-e/install-action@v2.49.1 uses: taiki-e/install-action@v2.49.11
with: with:
tool: just tool: just

View File

@ -18,12 +18,12 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install Rust - name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1.10.1 uses: actions-rust-lang/setup-rust-toolchain@v1.11.0
with: with:
components: llvm-tools-preview components: llvm-tools-preview
- name: Install cargo-llvm-cov - name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2.49.1 uses: taiki-e/install-action@v2.49.11
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@v5.3.1 uses: codecov/codecov-action@v5.4.0
with: with:
files: codecov.json files: codecov.json
fail_ci_if_error: true fail_ci_if_error: true

View File

@ -18,7 +18,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1.10.1 - uses: actions-rust-lang/setup-rust-toolchain@v1.11.0
with: with:
toolchain: nightly toolchain: nightly
components: rustfmt components: rustfmt
@ -35,7 +35,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1.10.1 - uses: actions-rust-lang/setup-rust-toolchain@v1.11.0
with: { components: clippy } with: { components: clippy }
- uses: giraffate/clippy-action@v1.0.1 - uses: giraffate/clippy-action@v1.0.1
@ -51,12 +51,12 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install Rust (${{ vars.RUST_VERSION_EXTERNAL_TYPES }}) - name: Install Rust (${{ vars.RUST_VERSION_EXTERNAL_TYPES }})
uses: actions-rust-lang/setup-rust-toolchain@v1.10.1 uses: actions-rust-lang/setup-rust-toolchain@v1.11.0
with: with:
toolchain: ${{ vars.RUST_VERSION_EXTERNAL_TYPES }} toolchain: ${{ vars.RUST_VERSION_EXTERNAL_TYPES }}
- name: Install just - name: Install just
uses: taiki-e/install-action@v2.49.1 uses: taiki-e/install-action@v2.49.11
with: with:
tool: just tool: just

1
.gitignore vendored
View File

@ -1,4 +1,3 @@
Cargo.lock
target/ target/
guide/build/ guide/build/
/gh-pages /gh-pages

2915
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,9 @@
## Unreleased ## Unreleased
## 2.5.1
- Fix panic in test server.
- Minimum supported Rust version (MSRV) is now 1.71. - Minimum supported Rust version (MSRV) is now 1.71.
## 2.5.0 ## 2.5.0

View File

@ -1,6 +1,6 @@
[package] [package]
name = "actix-server" name = "actix-server"
version = "2.5.0" version = "2.5.1"
authors = [ authors = [
"Nikolay Kim <fafhrd91@gmail.com>", "Nikolay Kim <fafhrd91@gmail.com>",
"Rob Ede <robjtede@icloud.com>", "Rob Ede <robjtede@icloud.com>",

View File

@ -5,11 +5,11 @@
<!-- prettier-ignore-start --> <!-- prettier-ignore-start -->
[![crates.io](https://img.shields.io/crates/v/actix-server?label=latest)](https://crates.io/crates/actix-server) [![crates.io](https://img.shields.io/crates/v/actix-server?label=latest)](https://crates.io/crates/actix-server)
[![Documentation](https://docs.rs/actix-server/badge.svg?version=2.5.0)](https://docs.rs/actix-server/2.5.0) [![Documentation](https://docs.rs/actix-server/badge.svg?version=2.5.1)](https://docs.rs/actix-server/2.5.1)
[![Version](https://img.shields.io/badge/rustc-1.52+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.52.0.html) [![Version](https://img.shields.io/badge/rustc-1.52+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.52.0.html)
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-server.svg) ![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-server.svg)
<br /> <br />
[![Dependency Status](https://deps.rs/crate/actix-server/2.5.0/status.svg)](https://deps.rs/crate/actix-server/2.5.0) [![Dependency Status](https://deps.rs/crate/actix-server/2.5.1/status.svg)](https://deps.rs/crate/actix-server/2.5.1)
![Download](https://img.shields.io/crates/d/actix-server.svg) ![Download](https://img.shields.io/crates/d/actix-server.svg)
[![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x) [![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x)

View File

@ -123,7 +123,9 @@ impl TestServerHandle {
/// Connect to server, returning a Tokio `TcpStream`. /// Connect to server, returning a Tokio `TcpStream`.
pub fn connect(&self) -> io::Result<TcpStream> { pub fn connect(&self) -> io::Result<TcpStream> {
TcpStream::from_std(net::TcpStream::connect(self.addr)?) let stream = net::TcpStream::connect(self.addr)?;
stream.set_nonblocking(true)?;
TcpStream::from_std(stream)
} }
} }

View File

@ -71,5 +71,7 @@ async fn new_with_builder() {
srv.connect().unwrap(); srv.connect().unwrap();
// connect to alt service defined in custom ServerBuilder // connect to alt service defined in custom ServerBuilder
TcpStream::from_std(net::TcpStream::connect(alt_addr).unwrap()).unwrap(); let stream = net::TcpStream::connect(alt_addr).unwrap();
stream.set_nonblocking(true).unwrap();
TcpStream::from_std(stream).unwrap();
} }

View File

@ -23,6 +23,8 @@ fmt:
downgrade-for-msrv: downgrade-for-msrv:
cargo update -p=clap --precise=4.4.18 cargo update -p=clap --precise=4.4.18
cargo update -p=native-tls --precise=0.2.13 cargo update -p=native-tls --precise=0.2.13
cargo update -p=litemap --precise=0.7.4
cargo update -p=zerofrom --precise=0.1.5
msrv := ``` msrv := ```
cargo metadata --format-version=1 \ cargo metadata --format-version=1 \
@ -70,9 +72,20 @@ test-docs toolchain="": && doc
test-all toolchain="": (test toolchain) (test-docs toolchain) test-all toolchain="": (test toolchain) (test-docs toolchain)
# Document crates in workspace. # Document crates in workspace.
doc *args: doc *args: && doc-set-workspace-crates
rm -f "$(cargo metadata --format-version=1 | jq -r '.target_directory')/doc/crates.js"
RUSTDOCFLAGS="--cfg=docsrs -Dwarnings" cargo +nightly doc --no-deps --workspace {{ all_crate_features }} {{ args }} RUSTDOCFLAGS="--cfg=docsrs -Dwarnings" cargo +nightly doc --no-deps --workspace {{ all_crate_features }} {{ args }}
[private]
doc-set-workspace-crates:
#!/usr/bin/env bash
(
echo "window.ALL_CRATES ="
cargo metadata --format-version=1 \
| jq '[.packages[] | select(.source == null) | .targets | map(select(.doc) | .name)] | flatten'
echo ";"
) > "$(cargo metadata --format-version=1 | jq -r '.target_directory')/doc/crates.js"
# Document crates in workspace and watch for changes. # Document crates in workspace and watch for changes.
doc-watch: doc-watch:
@just doc --open @just doc --open