From c7bad9350a6abb060c1b1f11a782e1924dab9a01 Mon Sep 17 00:00:00 2001 From: Joe Ardent Date: Sun, 25 Feb 2024 18:39:00 -0800 Subject: [PATCH] add tower-http --- Cargo.lock | 40 +++++++++++++++++++++++++++++++++++++++- Cargo.toml | 1 + 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index b5bc56f..673c081 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -163,6 +163,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" + [[package]] name = "bytes" version = "1.5.0" @@ -379,6 +385,12 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "http-range-header" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ce4ef31cda248bbdb6e6820603b82dfcd9e833db65a43e997a0ccec777d11fe" + [[package]] name = "httparse" version = "1.8.0" @@ -665,6 +677,7 @@ dependencies = [ "serde", "thiserror", "tokio", + "tower-http", "tower-sessions", "unicode-segmentation", ] @@ -714,7 +727,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -962,6 +975,31 @@ dependencies = [ "tower-service", ] +[[package]] +name = "tower-http" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" +dependencies = [ + "bitflags 2.4.2", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "http-range-header", + "httpdate", + "mime", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower-layer" version = "0.3.2" diff --git a/Cargo.toml b/Cargo.toml index 37ebece..ae3f90e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,5 +11,6 @@ justerror = { version = "1" } serde = { version = "1", default-features = false, features = ["derive"] } thiserror = { version = "1" } tokio = { version = "1", default-features = false, features = ["rt-multi-thread"] } +tower-http = { version = "0.5.2", default-features = false, features = ["fs"] } tower-sessions = { version = "0.10", default-features = false, features = ["axum-core", "memory-store"] } unicode-segmentation = { version = "1", default-features = false }