about summary refs log tree commit diff
path: root/src/media/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/media/mod.rs')
-rw-r--r--src/media/mod.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/media/mod.rs b/src/media/mod.rs
index 47f456a..7884ef8 100644
--- a/src/media/mod.rs
+++ b/src/media/mod.rs
@@ -1,6 +1,8 @@
 use axum::{
-    extract::{multipart::Multipart, FromRef, Host, Path, State}, headers::{HeaderMapExt, HeaderValue, IfNoneMatch}, response::{IntoResponse, Response}, TypedHeader
+    extract::{multipart::Multipart, FromRef, Host, Path, State}, response::{IntoResponse, Response}
 };
+use axum_extra::headers::{HeaderMapExt, HeaderValue, IfNoneMatch};
+use axum_extra::TypedHeader;
 use kittybox_util::error::{MicropubError, ErrorType};
 use kittybox_indieauth::Scope;
 use crate::indieauth::{backend::AuthBackend, User};
@@ -74,7 +76,7 @@ pub(crate) async fn serve<S: MediaStore>(
             tracing::debug!("Metadata: {:?}", metadata);
 
             let etag = if let Some(etag) = metadata.etag {
-                let etag = format!("\"{}\"", etag).parse::<axum::headers::ETag>().unwrap();
+                let etag = format!("\"{}\"", etag).parse::<axum_extra::headers::ETag>().unwrap();
 
                 if let Some(TypedHeader(if_none_match)) = if_none_match {
                     tracing::debug!("If-None-Match: {:?}", if_none_match);
@@ -110,7 +112,7 @@ pub(crate) async fn serve<S: MediaStore>(
                     headers.typed_insert(etag);
                 }
             }
-            r.body(axum::body::StreamBody::new(stream))
+            r.body(axum::body::Body::from_stream(stream))
                 .unwrap()
                 .into_response()
         },