mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 00:59:02 +03:00
fix: miss file 500
This commit is contained in:
@@ -134,6 +134,7 @@ impl InnerService {
|
|||||||
self.handle_query_dir(filepath, &query[3..], &mut res)
|
self.handle_query_dir(filepath, &query[3..], &mut res)
|
||||||
.await?
|
.await?
|
||||||
}
|
}
|
||||||
|
Method::GET if is_dir => self.handle_ls_dir(filepath, true, &mut res).await?,
|
||||||
Method::GET if is_file => {
|
Method::GET if is_file => {
|
||||||
self.handle_send_file(filepath, req.headers(), &mut res)
|
self.handle_send_file(filepath, req.headers(), &mut res)
|
||||||
.await?
|
.await?
|
||||||
@@ -141,7 +142,6 @@ impl InnerService {
|
|||||||
Method::GET if is_miss && path.ends_with('/') => {
|
Method::GET if is_miss && path.ends_with('/') => {
|
||||||
self.handle_ls_dir(filepath, false, &mut res).await?
|
self.handle_ls_dir(filepath, false, &mut res).await?
|
||||||
}
|
}
|
||||||
Method::GET => self.handle_ls_dir(filepath, true, &mut res).await?,
|
|
||||||
Method::OPTIONS => {
|
Method::OPTIONS => {
|
||||||
status!(res, StatusCode::NO_CONTENT);
|
status!(res, StatusCode::NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user