Repository: atuinsh/atuin (language: rust)

Issue:
chore(deps): bump http from 0.2.11 to 1.0.0
Bumps [http](https://github.com/hyperium/http) from 0.2.11 to 1.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/hyperium/http/releases">http's releases</a>.</em></p>
<blockquote>
<h2>v1.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Implement <code>Clone</code> for <code>Request</code>, <code>Response</code>, and <code>Extensions</code>. This breaking change requires
that all extensions now implement <code>Clone</code>.</li>
<li>Add a default-on <code>std</code> feature. Disabling it currently is not supported.</li>
<li>Fix MIRI warnings in <code>HeaderMap::iter()</code>.</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/hjr3"><code>@​hjr3</code></a> made their first contribution in <a href="https://redirect.github.com/hyperium/http/pull/644">hyperium/http#644</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/hyperium/http/blob/master/CHANGELOG.md">http's changelog</a>.</em></p>
<blockquote>
<h1>1.0.0 (November 15, 2023)</h1>
<ul>
<li>Implement <code>Clone</code> for <code>Request</code>, <code>Response</code>, and <code>Extensions</code>. This breaking change requires
that all extensions now implement <code>Clone</code>.</li>
<li>Add a default-on <code>std</code> feature. Disabling it currently is not supported.</li>
<li>Fix MIRI warnings in <code>HeaderMap::iter()</code>.</li>
</ul>
<h1>0.2.10 (November 10, 2023)</h1>
<ul>
<li>Fix parsing of <code>Authority</code> to handle square brackets in incorrect order.</li>
<li>Fix <code>HeaderMap::with_capacity()</code> to handle arithmetic overflow.</li>
</ul>
<h1>0.2.9 (February 17, 2023)</h1>
<ul>
<li>Add <code>HeaderName</code> constants for <code>cache-status</code> and <code>cdn-cache-control</code>.</li>
<li>Implement <code>Hash</code> for <code>PathAndQuery</code>.</li>
<li>Re-export <code>HeaderName</code> at crate root.</li>
</ul>
<h1>0.2.8 (June 6, 2022)</h1>
<ul>
<li>Fix internal usage of uninitialized memory to use <code>MaybeUninit</code> inside <code>HeaderName</code>.</li>
</ul>
<h1>0.2.7 (April 28, 2022)</h1>
<ul>
<li>MSRV bumped to <code>1.49</code>.</li>
<li>Add <code>extend()</code> method to <code>Extensions</code>.</li>
<li>Add <code>From&lt;Authority&gt;</code> and <code>From&lt;PathAndQuery&gt;</code> impls for <code>Uri</code>.</li>
<li>Make <code>HeaderName::from_static</code> a <code>const fn</code>.</li>
</ul>
<h1>0.2.6 (December 30, 2021)</h1>
<ul>
<li>Upgrade internal <code>itoa</code> dependency to 1.0.</li>
</ul>
<h1>0.2.5 (September 21, 2021)</h1>
<ul>
<li>Add <code>is_empty()</code> and <code>len()</code> methods to <code>Extensions</code>.</li>
<li>Add <code>version_ref()</code> method to <code>request::Builder</code>.</li>
<li>Implement <code>TryFrom&lt;Vec&lt;u8&gt;&gt;</code> and <code>TryFrom&lt;String&gt;</code> for <code>Authority</code>, <code>Uri</code>, <code>PathAndQuery</code>, and <code>HeaderName</code>.</li>
<li>Make <code>HeaderValue::from_static</code> a <code>const fn</code>.</li>
</ul>
<h1>0.2.4 (April 4, 2021)</h1>
<ul>
<li>Fix <code>Uri</code> parsing to allow <code>{</code>, <code>&quot;</code>, and <code>}</code> in paths.</li>
</ul>
<h1>0.2.3 (January 7, 2021)</h1>
<ul>
<li>Upgrade internal (private) <code>bytes</code> dependency to 1.0.</li>
</ul>
<h1>0.2.2 (December 14, 2020)</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/hyperium/http/commit/1c06623c9d97d42ac02c351ab4872d6481c793f7"><code>1c06623</code></a> v1.0.0</li>
<li><a href="https://github.com/hyperium/http/commit/c51f40f8da5abf725ab545bff842028be20a09f3"><code>c51f40f</code></a> feat: add default std feature</li>
<li><a href="https://github.com/hyperium/http/commit/e5b80c10c5711c764a57e0bb23386886a7699260"><code>e5b80c1</code></a> test: add test to ensure HeaderMap::iter safety</li>
<li><a href="https://github.com/hyperium/http/commit/60c9b463ea979e8a852e49afef126d51c0273d2b"><code>60c9b46</code></a> chore(ci): run miri tests</li>
<li><a href="https://github.com/hyperium/http/commit/0a9c8ad0d5b89cfbf87943e27eb1a13f8983a30b"><code>0a9c8ad</code></a> fix MIRI error in header::Iter (<a href="https://redirect.github.com/hyperium/http/issues/642">#642</a>)</li>
<li><a href="https://github.com/hyperium/http/commit/f5f31f0651774a5d68f2d5051b70e0bd0ccae577"><code>f5f31f0</code></a> feat: implement Clone for Request, Response, Extensions (<a href="https://redirect.github.com/hyperium/http/issues/634">#634</a>)</li>
<li><a href="https://github.com/hyperium/http/commit/aa1af3728b16cf8e8198246a0cb0d5d49503407a"><code>aa1af37</code></a> start 1.0</li>
<li>See full diff in <a href="https://github.com/hyperium/http/compare/v0.2.11...v1.0.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=http&package-manager=cargo&previous-version=0.2.11&new-version=1.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has been open for over 30 days.



Discussion / hints:
[vc]: #ZUueSqGpiYNG4RGOd7k9MxJLicwSTRTGyGjWoKc5ABE=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJhdHVpbi1kb2NzIiwiaW5zcGVjdG9yVXJsIjoiaHR0cHM6Ly92ZXJjZWwuY29tL2F0dWluL2F0dWluLWRvY3MvR0VqTUNyc1o5andkV0p5YVIzMzdVenlyOHVHVSIsInByZXZpZXdVcmwiOiJhdHVpbi1kb2NzLWdpdC1kZXBlbmRhYm90LWNhcmdvaHR0cC0xMDAtYXR1aW4udmVyY2VsLmFwcCIsIm5leHRDb21taXRTdGF0dXMiOiJERVBMT1lFRCIsImxpdmVGZWVkYmFjayI6eyJyZXNvbHZlZCI6MCwidW5yZXNvbHZlZCI6MCwidG90YWwiOjAsImxpbmsiOiJhdHVpbi1kb2NzLWdpdC1kZXBlbmRhYm90LWNhcmdvaHR0cC0xMDAtYXR1aW4udmVyY2VsLmFwcCJ9LCJyb290RGlyZWN0b3J5IjoiZG9jcyJ9XX0=
**The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more)

| Name | Status | Preview | Comments | Updated (UTC) |
| :--- | :----- | :------ | :------- | :------ |
| **atuin-docs** | ✅ Ready ([Inspect](https://vercel.com/atuin/atuin-docs/GEjMCrsZ9jwdWJyaR337Uzyr8uGU)) | [Visit Preview](https://vercel.live/open-feedback/atuin-docs-git-dependabot-cargohttp-100-atuin.vercel.app?via=pr-comment-visit-preview-link&passThrough=1) | 💬 [**Add feedback**](https://vercel.live/open-feedback/atuin-docs-git-dependabot-cargohttp-100-atuin.vercel.app?via=pr-comment-feedback-link) | Dec 27, 2023 2:17pm |


Dependabot tried to update this pull request, but something went wrong. We're looking into it, but in the meantime you can retry the update by commenting `@dependabot rebase`.

Fix patch:
diff --git a/Cargo.lock b/Cargo.lock
index 57879718bb3..688862e93de 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -282,15 +282,12 @@ dependencies = [
  "config",
  "eyre",
  "fs-err",
- "http 0.2.11",
- "hyper 1.1.0",
- "hyper-rustls",
  "metrics",
  "metrics-exporter-prometheus",
  "rand",
  "reqwest",
  "rustls",
- "rustls-pemfile",
+ "rustls-pemfile 2.0.0",
  "semver",
  "serde",
  "serde_json",
@@ -338,18 +335,19 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
 
 [[package]]
 name = "axum"
-version = "0.6.20"
+version = "0.7.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf"
+checksum = "1236b4b292f6c4d6dc34604bb5120d85c3fe1d1aa596bd5cc52ca054d13e7b9e"
 dependencies = [
  "async-trait",
  "axum-core",
- "bitflags 1.3.2",
  "bytes",
  "futures-util",
- "http 0.2.11",
- "http-body 0.4.6",
- "hyper 0.14.28",
+ "http 1.0.0",
+ "http-body 1.0.0",
+ "http-body-util",
+ "hyper 1.1.0",
+ "hyper-util",
  "itoa",
  "matchit",
  "memchr",
@@ -366,42 +364,50 @@ dependencies = [
  "tower",
  "tower-layer",
  "tower-service",
+ "tracing",
 ]
 
 [[package]]
 name = "axum-core"
-version = "0.3.4"
+version = "0.4.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c"
+checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3"
 dependencies = [
  "async-trait",
  "bytes",
  "futures-util",
- "http 0.2.11",
- "http-body 0.4.6",
+ "http 1.0.0",
+ "http-body 1.0.0",
+ "http-body-util",
  "mime",
+ "pin-project-lite",
  "rustversion",
+ "sync_wrapper",
  "tower-layer",
  "tower-service",
+ "tracing",
 ]
 
 [[package]]
 name = "axum-server"
-version = "0.5.1"
+version = "0.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "447f28c85900215cc1bea282f32d4a2f22d55c5a300afdfbc661c8d6a632e063"
+checksum = "c1ad46c3ec4e12f4a4b6835e173ba21c25e484c9d02b49770bf006ce5367c036"
 dependencies = [
  "arc-swap",
  "bytes",
  "futures-util",
- "http 0.2.11",
- "http-body 0.4.6",
- "hyper 0.14.28",
+ "http 1.0.0",
+ "http-body 1.0.0",
+ "http-body-util",
+ "hyper 1.1.0",
+ "hyper-util",
  "pin-project-lite",
  "rustls",
- "rustls-pemfile",
+ "rustls-pemfile 2.0.0",
  "tokio",
  "tokio-rustls",
+ "tower",
  "tower-service",
 ]
 
@@ -1310,6 +1316,25 @@ dependencies = [
  "tracing",
 ]
 
+[[package]]
+name = "h2"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943"
+dependencies = [
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "futures-util",
+ "http 1.0.0",
+ "indexmap 2.1.0",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "tracing",
+]
+
 [[package]]
 name = "hashbrown"
 version = "0.12.3"
@@ -1436,10 +1461,17 @@ dependencies = [
 ]
 
 [[package]]
-name = "http-range-header"
-version = "0.3.1"
+name = "http-body-util"
+version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f"
+checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840"
+dependencies = [
+ "bytes",
+ "futures-util",
+ "http 1.0.0",
+ "http-body 1.0.0",
+ "pin-project-lite",
+]
 
 [[package]]
 name = "httparse"
@@ -1469,7 +1501,7 @@ dependencies = [
  "futures-channel",
  "futures-core",
  "futures-util",
- "h2",
+ "h2 0.3.24",
  "http 0.2.11",
  "http-body 0.4.6",
  "httparse",
@@ -1490,8 +1522,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75"
 dependencies = [
  "bytes",
+ "futures-channel",
+ "futures-util",
+ "h2 0.4.2",
  "http 1.0.0",
  "http-body 1.0.0",
+ "httparse",
+ "httpdate",
+ "itoa",
  "pin-project-lite",
  "tokio",
 ]
@@ -1505,13 +1543,29 @@ dependencies = [
  "futures-util",
  "http 0.2.11",
  "hyper 0.14.28",
- "log",
  "rustls",
- "rustls-native-certs",
  "tokio",
  "tokio-rustls",
 ]
 
+[[package]]
+name = "hyper-util"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bdea9aac0dbe5a9240d68cfd9501e2db94222c6dc06843e06640b9e07f0fdc67"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "http 1.0.0",
+ "http-body 1.0.0",
+ "hyper 1.1.0",
+ "pin-project-lite",
+ "socket2",
+ "tokio",
+ "tracing",
+]
+
 [[package]]
 name = "idna"
 version = "0.5.0"
@@ -2515,7 +2569,7 @@ dependencies = [
  "encoding_rs",
  "futures-core",
  "futures-util",
- "h2",
+ "h2 0.3.24",
  "http 0.2.11",
  "http-body 0.4.6",
  "hyper 0.14.28",
@@ -2529,7 +2583,7 @@ dependencies = [
  "pin-project-lite",
  "rustls",
  "rustls-native-certs",
- "rustls-pemfile",
+ "rustls-pemfile 1.0.4",
  "serde",
  "serde_json",
  "serde_urlencoded",
@@ -2672,7 +2726,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00"
 dependencies = [
  "openssl-probe",
- "rustls-pemfile",
+ "rustls-pemfile 1.0.4",
  "schannel",
  "security-framework",
 ]
@@ -2686,6 +2740,22 @@ dependencies = [
  "base64 0.21.7",
 ]
 
+[[package]]
+name = "rustls-pemfile"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35e4980fa29e4c4b212ffb3db068a564cbf560e51d3944b7c88bd8bf5bec64f4"
+dependencies = [
+ "base64 0.21.7",
+ "rustls-pki-types",
+]
+
+[[package]]
+name = "rustls-pki-types"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e9d979b3ce68192e42760c7810125eb6cf2ea10efae545a156063e61f314e2a"
+
 [[package]]
 name = "rustls-webpki"
 version = "0.101.7"
@@ -3074,7 +3144,7 @@ dependencies = [
  "paste",
  "percent-encoding",
  "rustls",
- "rustls-pemfile",
+ "rustls-pemfile 1.0.4",
  "serde",
  "serde_json",
  "sha2",
@@ -3559,17 +3629,15 @@ dependencies = [
 
 [[package]]
 name = "tower-http"
-version = "0.4.4"
+version = "0.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140"
+checksum = "0da193277a4e2c33e59e09b5861580c33dd0a637c3883d0fa74ba40c0374af2e"
 dependencies = [
  "bitflags 2.4.2",
  "bytes",
- "futures-core",
- "futures-util",
- "http 0.2.11",
- "http-body 0.4.6",
- "http-range-header",
+ "http 1.0.0",
+ "http-body 1.0.0",
+ "http-body-util",
  "pin-project-lite",
  "tower-layer",
  "tower-service",
diff --git a/atuin-server/Cargo.toml b/atuin-server/Cargo.toml
index 7882fc7a74f..18f8c280c33 100644
--- a/atuin-server/Cargo.toml
+++ b/atuin-server/Cargo.toml
@@ -25,17 +25,14 @@ base64 = { workspace = true }
 rand = { workspace = true }
 tokio = { workspace = true }
 async-trait = { workspace = true }
-axum = "0.6.4"
-axum-server = { version = "0.5.1", features = ["tls-rustls"] }
-http = "0.2"
-hyper = "1.1"
-hyper-rustls = "0.24"
+axum = "0.7.4"
+axum-server = { version = "0.6.0", features = ["tls-rustls"] }
 fs-err = { workspace = true }
 tower = "0.4"
-tower-http = { version = "0.4", features = ["trace"] }
+tower-http = { version = "0.5.1", features = ["trace"] }
 reqwest = { workspace = true }
 rustls = "0.21"
-rustls-pemfile = "1.0"
+rustls-pemfile = "2.0"
 argon2 = "0.5.3"
 semver = { workspace = true }
 metrics-exporter-prometheus = "0.12.1"
diff --git a/atuin-server/src/handlers/history.rs b/atuin-server/src/handlers/history.rs
index cdee39882ea..05bbe7404ea 100644
--- a/atuin-server/src/handlers/history.rs
+++ b/atuin-server/src/handlers/history.rs
@@ -2,10 +2,9 @@ use std::{collections::HashMap, convert::TryFrom};
 
 use axum::{
     extract::{Path, Query, State},
-    http::HeaderMap,
+    http::{HeaderMap, StatusCode},
     Json,
 };
-use http::StatusCode;
 use metrics::counter;
 use time::{Month, UtcOffset};
 use tracing::{debug, error, instrument};
@@ -215,7 +214,7 @@ pub async fn calendar<DB: Database>(
         error: ErrorResponse {
             reason: e.to_string().into(),
         },
-        status: http::StatusCode::BAD_REQUEST,
+        status: StatusCode::BAD_REQUEST,
     })?;
 
     let period = match focus {
diff --git a/atuin-server/src/handlers/mod.rs b/atuin-server/src/handlers/mod.rs
index b66a20bf5e7..a10e622dd73 100644
--- a/atuin-server/src/handlers/mod.rs
+++ b/atuin-server/src/handlers/mod.rs
@@ -1,6 +1,6 @@
 use atuin_common::api::{ErrorResponse, IndexResponse};
 use atuin_server_database::Database;
-use axum::{extract::State, response::IntoResponse, Json};
+use axum::{extract::State, http, response::IntoResponse, Json};
 
 use crate::router::AppState;
 
diff --git a/atuin-server/src/handlers/record.rs b/atuin-server/src/handlers/record.rs
index b5c07c5b8de..bf454949bc5 100644
--- a/atuin-server/src/handlers/record.rs
+++ b/atuin-server/src/handlers/record.rs
@@ -1,5 +1,4 @@
-use axum::{response::IntoResponse, Json};
-use http::StatusCode;
+use axum::{http::StatusCode, response::IntoResponse, Json};
 use serde_json::json;
 use tracing::instrument;
 
diff --git a/atuin-server/src/handlers/status.rs b/atuin-server/src/handlers/status.rs
index d9b6afafa4d..3c22232c321 100644
--- a/atuin-server/src/handlers/status.rs
+++ b/atuin-server/src/handlers/status.rs
@@ -1,5 +1,4 @@
-use axum::{extract::State, Json};
-use http::StatusCode;
+use axum::{extract::State, http::StatusCode, Json};
 use tracing::instrument;
 
 use super::{ErrorResponse, ErrorResponseStatus, RespExt};
diff --git a/atuin-server/src/handlers/user.rs b/atuin-server/src/handlers/user.rs
index 535c740f14f..fb281ab3db8 100644
--- a/atuin-server/src/handlers/user.rs
+++ b/atuin-server/src/handlers/user.rs
@@ -8,9 +8,9 @@ use argon2::{
 };
 use axum::{
     extract::{Path, State},
+    http::StatusCode,
     Json,
 };
-use http::StatusCode;
 use metrics::counter;
 use rand::rngs::OsRng;
 use tracing::{debug, error, info, instrument};
diff --git a/atuin-server/src/handlers/v0/record.rs b/atuin-server/src/handlers/v0/record.rs
index 438dd459094..e1b5d29c07b 100644
--- a/atuin-server/src/handlers/v0/record.rs
+++ b/atuin-server/src/handlers/v0/record.rs
@@ -1,5 +1,4 @@
-use axum::{extract::Query, extract::State, Json};
-use http::StatusCode;
+use axum::{extract::Query, extract::State, http::StatusCode, Json};
 use metrics::counter;
 use serde::Deserialize;
 use tracing::{error, instrument};
diff --git a/atuin-server/src/lib.rs b/atuin-server/src/lib.rs
index b505a8ec374..a0c104dc045 100644
--- a/atuin-server/src/lib.rs
+++ b/atuin-server/src/lib.rs
@@ -1,12 +1,11 @@
 #![forbid(unsafe_code)]
 
+use std::future::Future;
 use std::net::SocketAddr;
 use std::sync::Arc;
-use std::{future::Future, net::TcpListener};
 
 use atuin_server_database::Database;
-use axum::Router;
-use axum::Server;
+use axum::{serve, Router};
 use axum_server::Handle;
 use eyre::{Context, Result};
 
@@ -21,6 +20,7 @@ pub use settings::Settings;
 
 pub mod settings;
 
+use tokio::net::TcpListener;
 use tokio::signal;
 
 #[cfg(target_family = "unix")]
@@ -55,7 +55,9 @@ pub async fn launch<Db: Database>(
     } else {
         launch_with_tcp_listener::<Db>(
             settings,
-            TcpListener::bind(addr).context("could not connect to socket")?,
+            TcpListener::bind(addr)
+                .await
+                .context("could not connect to socket")?,
             shutdown_signal(),
         )
         .await
@@ -65,13 +67,11 @@ pub async fn launch<Db: Database>(
 pub async fn launch_with_tcp_listener<Db: Database>(
     settings: Settings<Db::Settings>,
     listener: TcpListener,
-    shutdown: impl Future<Output = ()>,
+    shutdown: impl Future<Output = ()> + Send + 'static,
 ) -> Result<()> {
     let r = make_router::<Db>(settings).await?;
 
-    Server::from_tcp(listener)
-        .context("could not launch server")?
-        .serve(r.into_make_service())
+    serve(listener, r.into_make_service())
         .with_graceful_shutdown(shutdown)
         .await?;
 
@@ -115,7 +115,9 @@ async fn launch_with_tls<Db: Database>(
 // The separate listener means it's much easier to ensure metrics are not accidentally exposed to
 // the public.
 pub async fn launch_metrics_server(host: String, port: u16) -> Result<()> {
-    let listener = TcpListener::bind((host, port)).context("failed to bind metrics tcp")?;
+    let listener = TcpListener::bind((host, port))
+        .await
+        .context("failed to bind metrics tcp")?;
 
     let recorder_handle = metrics::setup_metrics_recorder();
 
@@ -124,9 +126,7 @@ pub async fn launch_metrics_server(host: String, port: u16) -> Result<()> {
         axum::routing::get(move || std::future::ready(recorder_handle.render())),
     );
 
-    Server::from_tcp(listener)
-        .context("could not launch server")?
-        .serve(router.into_make_service())
+    serve(listener, router.into_make_service())
         .with_graceful_shutdown(shutdown_signal())
         .await?;
 
diff --git a/atuin-server/src/metrics.rs b/atuin-server/src/metrics.rs
index 2e3e6894ae2..0a7ac6bdef4 100644
--- a/atuin-server/src/metrics.rs
+++ b/atuin-server/src/metrics.rs
@@ -1,6 +1,10 @@
 use std::time::Instant;
 
-use axum::{extract::MatchedPath, http::Request, middleware::Next, response::IntoResponse};
+use axum::{
+    extract::{MatchedPath, Request},
+    middleware::Next,
+    response::IntoResponse,
+};
 use metrics_exporter_prometheus::{Matcher, PrometheusBuilder, PrometheusHandle};
 
 pub fn setup_metrics_recorder() -> PrometheusHandle {
@@ -21,7 +25,7 @@ pub fn setup_metrics_recorder() -> PrometheusHandle {
 /// Middleware to record some common HTTP metrics
 /// Generic over B to allow for arbitrary body types (eg Vec<u8>, Streams, a deserialized thing, etc)
 /// Someday tower-http might provide a metrics middleware: https://github.com/tower-rs/tower-http/issues/57
-pub async fn track_metrics<B>(req: Request<B>, next: Next<B>) -> impl IntoResponse {
+pub async fn track_metrics(req: Request, next: Next) -> impl IntoResponse {
     let start = Instant::now();
 
     let path = if let Some(matched_path) = req.extensions().get::<MatchedPath>() {
diff --git a/atuin-server/src/router.rs b/atuin-server/src/router.rs
index 500e1a29a0a..8509058f940 100644
--- a/atuin-server/src/router.rs
+++ b/atuin-server/src/router.rs
@@ -1,15 +1,14 @@
 use async_trait::async_trait;
 use atuin_common::api::{ErrorResponse, ATUIN_CARGO_VERSION, ATUIN_HEADER_VERSION};
 use axum::{
-    extract::FromRequestParts,
-    http::Request,
+    extract::{FromRequestParts, Request},
+    http::{self, request::Parts},
     middleware::Next,
     response::{IntoResponse, Response},
     routing::{delete, get, post},
     Router,
 };
 use eyre::Result;
-use http::request::Parts;
 use tower::ServiceBuilder;
 use tower_http::trace::TraceLayer;
 
@@ -81,7 +80,7 @@ async fn teapot() -> impl IntoResponse {
     (http::StatusCode::NOT_FOUND, "404 not found")
 }
 
-async fn clacks_overhead<B>(request: Request<B>, next: Next<B>) -> Response {
+async fn clacks_overhead(request: Request, next: Next) -> Response {
     let mut response = next.run(request).await;
 
     let gnu_terry_value = "GNU Terry Pratchett, Kris Nova";
@@ -94,7 +93,7 @@ async fn clacks_overhead<B>(request: Request<B>, next: Next<B>) -> Response {
 }
 
 /// Ensure that we only try and sync with clients on the same major version
-async fn semver<B>(request: Request<B>, next: Next<B>) -> Response {
+async fn semver(request: Request, next: Next) -> Response {
     let mut response = next.run(request).await;
     response
         .headers_mut()
diff --git a/atuin-server/src/settings.rs b/atuin-server/src/settings.rs
index 1b15201332c..2d00df36069 100644
--- a/atuin-server/src/settings.rs
+++ b/atuin-server/src/settings.rs
@@ -116,10 +116,9 @@ impl Tls {
             .with_context(|| format!("tls.cert_path {:?} is missing", self.cert_path))?;
         let mut reader = std::io::BufReader::new(cert_file);
         let certs: Vec<_> = rustls_pemfile::certs(&mut reader)
-            .with_context(|| format!("tls.cert_path {:?} is invalid", self.cert_path))?
-            .into_iter()
-            .map(rustls::Certificate)
-            .collect();
+            .map(|c| c.map(|c| rustls::Certificate(c.to_vec())))
+            .collect::<Result<Vec<_>, _>>()
+            .with_context(|| format!("tls.cert_path {:?} is invalid", self.cert_path))?;
 
         if certs.is_empty() {
             bail!(
@@ -136,6 +135,8 @@ impl Tls {
             .with_context(|| format!("tls.pkey_path {:?} is missing", self.pkey_path))?;
         let mut reader = std::io::BufReader::new(pkey_file);
         let keys = rustls_pemfile::pkcs8_private_keys(&mut reader)
+            .map(|c| c.map(|c| rustls::PrivateKey(c.secret_pkcs8_der().to_vec())))
+            .collect::<Result<Vec<_>, _>>()
             .with_context(|| format!("tls.pkey_path {:?} is not PKCS8-encoded", self.pkey_path))?;
 
         if keys.is_empty() {
@@ -145,8 +146,6 @@ impl Tls {
             );
         }
 
-        let key = rustls::PrivateKey(keys[0].clone());
-
-        Ok(key)
+        Ok(keys[0].clone())
     }
 }


Test patch:
diff --git a/atuin/tests/sync.rs b/atuin/tests/sync.rs
index 8c42b171815..4ae56a7b065 100644
--- a/atuin/tests/sync.rs
+++ b/atuin/tests/sync.rs
@@ -1,4 +1,4 @@
-use std::{env, net::TcpListener, time::Duration};
+use std::{env, time::Duration};
 
 use atuin_client::api_client;
 use atuin_common::{api::AddHistoryRequest, utils::uuid_v7};
@@ -6,7 +6,7 @@ use atuin_server::{launch_with_tcp_listener, Settings as ServerSettings};
 use atuin_server_postgres::{Postgres, PostgresSettings};
 use futures_util::TryFutureExt;
 use time::OffsetDateTime;
-use tokio::{sync::oneshot, task::JoinHandle};
+use tokio::{net::TcpListener, sync::oneshot, task::JoinHandle};
 use tracing::{dispatcher, Dispatch};
 use tracing_subscriber::{layer::SubscriberExt, EnvFilter};
 
@@ -42,7 +42,7 @@ async fn start_server(path: &str) -> (String, oneshot::Sender<()>, JoinHandle<()
     };
 
     let (shutdown_tx, shutdown_rx) = tokio::sync::oneshot::channel();
-    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
+    let listener = TcpListener::bind("127.0.0.1:0").await.unwrap();
     let addr = listener.local_addr().unwrap();
     let server = tokio::spawn(async move {
         let _tracing_guard = dispatcher::set_default(&dispatch);