Skip to content

Commit 23bc48d

Browse files
Merge branch 'hyperium:master' into testfully
2 parents 475f31e + 0f0b6ed commit 23bc48d

37 files changed

+951
-451
lines changed

.github/workflows/CI.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
runs-on: ubuntu-latest
3838
steps:
3939
- name: Checkout
40-
uses: actions/checkout@v4
40+
uses: actions/checkout@v6
4141

4242
- name: Install Rust
4343
uses: dtolnay/rust-toolchain@stable
@@ -79,7 +79,7 @@ jobs:
7979

8080
steps:
8181
- name: Checkout
82-
uses: actions/checkout@v4
82+
uses: actions/checkout@v6
8383

8484
- name: Install Rust (${{ matrix.rust }})
8585
uses: dtolnay/rust-toolchain@master
@@ -103,7 +103,7 @@ jobs:
103103

104104
steps:
105105
- name: Checkout
106-
uses: actions/checkout@v4
106+
uses: actions/checkout@v6
107107

108108
- uses: dtolnay/rust-toolchain@stable
109109

@@ -133,7 +133,7 @@ jobs:
133133

134134
steps:
135135
- name: Checkout
136-
uses: actions/checkout@v4
136+
uses: actions/checkout@v6
137137

138138
- name: Install Rust
139139
uses: dtolnay/rust-toolchain@nightly
@@ -152,7 +152,7 @@ jobs:
152152
runs-on: ubuntu-latest
153153
steps:
154154
- name: Checkout
155-
uses: actions/checkout@v4
155+
uses: actions/checkout@v6
156156

157157
- name: Install Rust
158158
uses: dtolnay/rust-toolchain@stable
@@ -178,7 +178,7 @@ jobs:
178178
runs-on: ubuntu-latest
179179
steps:
180180
- name: Checkout
181-
uses: actions/checkout@v4
181+
uses: actions/checkout@v6
182182

183183
- name: Install Rust
184184
uses: dtolnay/rust-toolchain@stable
@@ -203,7 +203,7 @@ jobs:
203203
runs-on: ubuntu-latest
204204
steps:
205205
- name: Checkout
206-
uses: actions/checkout@v4
206+
uses: actions/checkout@v6
207207

208208
- name: Install Rust
209209
uses: dtolnay/rust-toolchain@stable
@@ -234,7 +234,7 @@ jobs:
234234
runs-on: ubuntu-latest
235235
steps:
236236
- name: Checkout
237-
uses: actions/checkout@v4
237+
uses: actions/checkout@v6
238238

239239
- name: Install Rust
240240
uses: dtolnay/rust-toolchain@stable
@@ -259,7 +259,7 @@ jobs:
259259
runs-on: ubuntu-latest
260260
steps:
261261
- name: Checkout
262-
uses: actions/checkout@v4
262+
uses: actions/checkout@v6
263263

264264
- name: Install Rust
265265
uses: dtolnay/rust-toolchain@nightly
@@ -275,17 +275,17 @@ jobs:
275275
runs-on: ubuntu-latest
276276
steps:
277277
- name: Checkout
278-
uses: actions/checkout@v4
278+
uses: actions/checkout@v6
279279

280280
- name: Install Rust
281281
uses: dtolnay/rust-toolchain@master
282282
with:
283-
toolchain: nightly-2024-05-01 # Compatible version for cargo-check-external-types
283+
toolchain: nightly-2025-10-18 # Compatible version for cargo-check-external-types
284284

285285
- name: Install cargo-check-external-types
286286
uses: taiki-e/cache-cargo-install-action@v2
287287
with:
288-
tool: cargo-check-external-types@0.1.12
288+
tool: cargo-check-external-types@0.4.0
289289

290290
- uses: Swatinem/rust-cache@v2
291291

@@ -297,7 +297,7 @@ jobs:
297297
runs-on: ubuntu-latest
298298
steps:
299299
- name: Checkout
300-
uses: actions/checkout@v4
300+
uses: actions/checkout@v6
301301

302302
- name: Install Rust
303303
uses: dtolnay/rust-toolchain@nightly
@@ -317,7 +317,7 @@ jobs:
317317
runs-on: ubuntu-latest
318318
needs: [style]
319319
steps:
320-
- uses: actions/checkout@v4
320+
- uses: actions/checkout@v6
321321
- uses: dtolnay/rust-toolchain@nightly
322322
- uses: dtolnay/rust-toolchain@stable
323323
- uses: taiki-e/install-action@cargo-hack
@@ -330,7 +330,7 @@ jobs:
330330
name: semver
331331
runs-on: ubuntu-latest
332332
steps:
333-
- uses: actions/checkout@v4
333+
- uses: actions/checkout@v6
334334
- name: Check semver
335335
uses: obi1kenobi/cargo-semver-checks-action@v2
336336
with:

.github/workflows/bench.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- end_to_end
1515
- pipeline
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v6
1818

1919
- name: Install Rust
2020
uses: dtolnay/rust-toolchain@nightly

.github/workflows/cargo-audit.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: cargo-audit
2+
on:
3+
push:
4+
paths:
5+
- '**/Cargo.toml'
6+
- '**/Cargo.lock'
7+
schedule:
8+
- cron: '0 16 * * Mon'
9+
10+
jobs:
11+
security_audit:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
- uses: rustsec/audit-check@v2
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,62 @@
1+
### v1.8.1 (2025-11-13)
2+
3+
4+
#### Bug Fixes
5+
6+
* **http1:** fix consuming extra CPU from previous change (#3977) ([4492f31e](https://github.com/hyperium/hyper/commit/4492f31e9429c34166da5a069c00b65be20e4a02))
7+
8+
9+
## v1.8.0 (2025-11-11)
10+
11+
12+
#### Bug Fixes
13+
14+
* **http1:** fix rare missed write wakeup on connections (#3952) ([2377b893](https://github.com/hyperium/hyper/commit/2377b893f6e64ca9878e4f25d1472b96baa7e3ea))
15+
* **http2:** fix internals of HTTP/2 CONNECT upgrades (#3967) ([58e0e7dc](https://github.com/hyperium/hyper/commit/58e0e7dc70612117ccdc40da395922f791cb273a), closes [#3966](https://github.com/hyperium/hyper/issues/3966))
16+
17+
18+
#### Features
19+
20+
* **rt:** add `Timer::now()` method to allow overriding the instant returned (#3965) ([5509ebe6](https://github.com/hyperium/hyper/commit/5509ebe6156e32d4f8986fafa25c2918a30005be))
21+
22+
23+
#### Breaking Changes
24+
25+
* The HTTP/2 client connection no longer allows an executor
26+
that can not spawn itself.
27+
28+
This was an oversight originally. The client connection will now include spawning
29+
a future that keeps a copy of the executor to spawn other futures. Thus, if it is
30+
`!Send`, it needs to spawn `!Send` futures. The likelihood of executors that match
31+
the previously allowed behavior should be very remote.
32+
33+
There is also technically a semver break in here, which is that the
34+
`Http2ClientConnExec` trait no longer dyn-compatible, because it now expects to
35+
be `Clone`. This should not break usage of the `conn` builder, because it already
36+
separately had `E: Clone` bounds. If someone were using `dyn Http2ClientConnExec`,
37+
that will break. However, there is no purpose for doing so, and it is not usable
38+
otherwise, since the trait only exists to propagate bounds into hyper. Thus, the
39+
breakage should not affect anyone.
40+
([58e0e7dc](https://github.com/hyperium/hyper/commit/58e0e7dc70612117ccdc40da395922f791cb273a))
41+
42+
43+
## v1.7.0 (2025-08-18)
44+
45+
46+
#### Bug Fixes
47+
48+
* **server:** improve caching accuracy of Date header (#3887) ([436cadd1](https://github.com/hyperium/hyper/commit/436cadd1ac08a9508a46f550e03281db9f2fee97))
49+
50+
51+
#### Features
52+
53+
* **client:**
54+
* add a `TrySendError::error()` method (#3885) ([efa0b269](https://github.com/hyperium/hyper/commit/efa0b26958386ffaf646e6d9a3150ca5041162a3))
55+
* add a `TrySendError::message()` method (#3884) ([03fd6aff](https://github.com/hyperium/hyper/commit/03fd6aff88c99a0842bb2e578a4993a432c03049))
56+
* **error:** add `Error::is_shutdown()` (#3863) ([b8affd8a](https://github.com/hyperium/hyper/commit/b8affd8a2ee5d77dec0c32050a7234e4f2f3751b), closes [#2745](https://github.com/hyperium/hyper/issues/2745))
57+
* **server:** add `allow_multiple_spaces_in_request_line_delimiters` http1 builder method (#3929) ([9749184f](https://github.com/hyperium/hyper/commit/9749184f8a21c387e404d628aceb992f0bf93e49))
58+
59+
160
## v1.6.0 (2025-01-28)
261

362

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hyper"
3-
version = "1.6.0"
3+
version = "1.8.1"
44
description = "A protective and efficient HTTP library for all."
55
readme = "README.md"
66
homepage = "https://hyper.rs"
@@ -88,7 +88,7 @@ client = ["dep:want", "dep:pin-project-lite", "dep:smallvec"]
8888
server = ["dep:httpdate", "dep:pin-project-lite", "dep:smallvec"]
8989

9090
# C-API support (currently unstable (no semver))
91-
ffi = ["dep:http-body-util", "futures-util"]
91+
ffi = ["dep:http-body-util", "dep:futures-util"]
9292
capi = []
9393

9494
# Utilize tracing (currently unstable)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014-2025 Sean McArthur
1+
Copyright (c) 2014-2026 Sean McArthur
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

benches/support/tokiort.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ impl Timer for TokioTimer {
4242
})
4343
}
4444

45+
fn now(&self) -> Instant {
46+
tokio::time::Instant::now().into()
47+
}
48+
4549
fn reset(&self, sleep: &mut Pin<Box<dyn Sleep>>, new_deadline: Instant) {
4650
if let Some(sleep) = sleep.as_mut().downcast_mut_pin::<TokioSleep>() {
4751
sleep.reset(new_deadline)

capi/cbindgen.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# a list of possible configuration values.
33
language = "C"
44
header = """/*
5-
* Copyright 2023 Sean McArthur. MIT License.
5+
* Copyright 2026 Sean McArthur. MIT License.
66
* Generated by gen_header.sh. Do not edit directly.
77
*
88
* Full docs at: https://docs.rs/hyper/latest/hyper/ffi/index.html

capi/include/hyper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 Sean McArthur. MIT License.
2+
* Copyright 2026 Sean McArthur. MIT License.
33
* Generated by gen_header.sh. Do not edit directly.
44
*
55
* Full docs at: https://docs.rs/hyper/latest/hyper/ffi/index.html

examples/params.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async fn param_example(
5252
return Ok(Response::builder()
5353
.status(StatusCode::UNPROCESSABLE_ENTITY)
5454
.body(full(MISSING))
55-
.unwrap());
55+
.expect("constant status won't error"));
5656
};
5757
let number = if let Some(n) = params.get("number") {
5858
if let Ok(v) = n.parse::<f64>() {
@@ -61,13 +61,13 @@ async fn param_example(
6161
return Ok(Response::builder()
6262
.status(StatusCode::UNPROCESSABLE_ENTITY)
6363
.body(full(NOTNUMERIC))
64-
.unwrap());
64+
.expect("constant status won't error"));
6565
}
6666
} else {
6767
return Ok(Response::builder()
6868
.status(StatusCode::UNPROCESSABLE_ENTITY)
6969
.body(full(MISSING))
70-
.unwrap());
70+
.expect("constant status won't error"));
7171
};
7272

7373
// Render the response. This will often involve
@@ -86,7 +86,7 @@ async fn param_example(
8686
return Ok(Response::builder()
8787
.status(StatusCode::UNPROCESSABLE_ENTITY)
8888
.body(full(MISSING))
89-
.unwrap());
89+
.expect("constant status won't error"));
9090
};
9191
let params = form_urlencoded::parse(query.as_bytes())
9292
.into_owned()
@@ -97,15 +97,15 @@ async fn param_example(
9797
return Ok(Response::builder()
9898
.status(StatusCode::UNPROCESSABLE_ENTITY)
9999
.body(full(MISSING))
100-
.unwrap());
100+
.expect("constant status won't error"));
101101
};
102102
let body = format!("You requested {}", page);
103103
Ok(Response::new(full(body)))
104104
}
105105
_ => Ok(Response::builder()
106106
.status(StatusCode::NOT_FOUND)
107107
.body(empty())
108-
.unwrap()),
108+
.expect("constant status won't error")),
109109
}
110110
}
111111

0 commit comments

Comments
 (0)