Fix serve_dir
feature
This commit is contained in:
parent
5254c17e36
commit
71c1ac0fab
|
@ -28,7 +28,7 @@ pub async fn serve_file<P: AsRef<Path>>(path: P, mime: &Mime) -> Result<Response
|
|||
}
|
||||
};
|
||||
|
||||
Ok(Response::success_with_body(mime, file))
|
||||
Ok(Response::success(mime, file))
|
||||
}
|
||||
|
||||
#[cfg(feature="serve_dir")]
|
||||
|
@ -93,7 +93,7 @@ async fn serve_dir_listing<P: AsRef<Path>, B: AsRef<Path>>(path: P, virtual_path
|
|||
));
|
||||
}
|
||||
|
||||
Ok(Response::document(document))
|
||||
Ok(document.into())
|
||||
}
|
||||
|
||||
#[cfg(feature="serve_dir")]
|
||||
|
|
Loading…
Reference in a new issue