refactor(protocols): replace tar with astral-tokio-tar for async processing (#2099)

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>
This commit is contained in:
houseme
2026-03-08 15:18:15 +08:00
committed by GitHub
parent b035d10abb
commit 8e4a1ef917
11 changed files with 235 additions and 146 deletions
+3 -3
View File
@@ -364,7 +364,7 @@ pub async fn handle_formpost(
body: Vec<u8>,
tempurl_key: &str,
credentials: &rustfs_credentials::Credentials,
) -> SwiftResult<axum::http::Response<s3s::Body>> {
) -> SwiftResult<http::Response<s3s::Body>> {
use axum::http::{Response, StatusCode};
// Parse multipart boundary
@@ -424,9 +424,9 @@ pub async fn handle_formpost(
let reader = std::io::Cursor::new(file.contents.clone());
// Create headers for upload
let mut upload_headers = axum::http::HeaderMap::new();
let mut upload_headers = http::HeaderMap::new();
if let Some(ct) = &file.content_type
&& let Ok(header_value) = axum::http::HeaderValue::from_str(ct)
&& let Ok(header_value) = http::HeaderValue::from_str(ct)
{
upload_headers.insert("content-type", header_value);
}