Skip to content

Commit 3de4ad6

Browse files
authored
Merge branch 'master' into diretnan/fix-shutdown-with-unflushed-body
2 parents 7e4abe4 + c36ca8a commit 3de4ad6

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.github/workflows/cargo-audit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v6
15+
- name: Generate lockfile
16+
run: cargo generate-lockfile --features full
1517
- uses: rustsec/audit-check@v2
1618
with:
1719
token: ${{ secrets.GITHUB_TOKEN }}

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ tokio = { version = "1", features = [
5959
"io-std",
6060
"io-util",
6161
"rt",
62-
"rt-multi-thread", # so examples can use #[tokio::main]
62+
"rt-multi-thread",
6363
"sync",
6464
"time",
6565
"test-util",

src/proto/h2/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,17 @@ fn strip_connection_headers(headers: &mut HeaderMap, is_request: bool) {
6464
"Connection header illegal in HTTP/2: {}",
6565
CONNECTION.as_str()
6666
);
67-
let header_contents = header.to_str().unwrap();
68-
6967
// A `Connection` header may have a comma-separated list of names of other headers that
7068
// are meant for only this specific connection.
7169
//
7270
// Iterate these names and remove them as headers. Connection-specific headers are
7371
// forbidden in HTTP2, as that information has been moved into frame types of the h2
7472
// protocol.
75-
for name in header_contents.split(',') {
76-
let name = name.trim();
77-
headers.remove(name);
73+
if let Ok(header_contents) = header.to_str() {
74+
for name in header_contents.split(',') {
75+
let name = name.trim();
76+
headers.remove(name);
77+
}
7878
}
7979
}
8080
}

0 commit comments

Comments
 (0)