Merge pull request #304 from rustfs/update-tonic

fix upgrade axum bug
This commit is contained in:
junxiangMu
2025-04-09 14:21:12 +08:00
committed by GitHub
5 changed files with 28 additions and 4 deletions

23
Cargo.lock generated
View File

@@ -752,6 +752,28 @@ dependencies = [
"tracing",
]
[[package]]
name = "axum-extra"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45bf463831f5131b7d3c756525b305d40f1185b688565648a92e1392ca35713d"
dependencies = [
"axum",
"axum-core",
"bytes",
"futures-util",
"http",
"http-body",
"http-body-util",
"mime",
"pin-project-lite",
"rustversion",
"serde",
"tower 0.5.2",
"tower-layer",
"tower-service",
]
[[package]]
name = "axum-server"
version = "0.7.2"
@@ -7082,6 +7104,7 @@ dependencies = [
"async-trait",
"atoi",
"axum",
"axum-extra",
"axum-server",
"bytes",
"chrono",

View File

@@ -52,7 +52,7 @@ common = { path = "./common/common" }
policy = { path = "./policy" }
hex = "0.4.3"
hyper = "1.6.0"
hyper-util = { version = "0.1.10", features = [
hyper-util = { version = "0.1.11", features = [
"tokio",
"server-auto",
"server-graceful",
@@ -133,6 +133,7 @@ uuid = { version = "1.15.1", features = [
"macro-diagnostics",
] }
axum = "0.8.3"
axum-extra = "0.10.1"
axum-server = { version = "0.7.2", features = ["tls-rustls"] }
md-5 = "0.10.6"
workers = { path = "./common/workers" }

View File

@@ -70,6 +70,7 @@ transform-stream.workspace = true
uuid = "1.15.1"
url.workspace = true
axum.workspace = true
axum-extra = { workspace = true }
axum-server = { workspace = true }
matchit = "0.8.4"
shadow-rs.workspace = true

View File

@@ -1,12 +1,12 @@
use crate::license::get_license;
use axum::{
body::Body,
extract::Host,
http::{Response, StatusCode},
response::IntoResponse,
routing::get,
Router,
};
use axum_extra::extract::Host;
use axum_server::tls_rustls::RustlsConfig;
use mime_guess::from_path;
use rust_embed::RustEmbed;

View File

@@ -80,8 +80,7 @@ pin_project! {
impl<RestBody, GrpcBody> Default for HybridBody<RestBody, GrpcBody>
where
RestBody: Default,
GrpcBody: Default,
// GrpcBody: Default,
{
fn default() -> Self {
Self::Rest {