Skip to content

Commit

Permalink
non-existing dir to Ok()
Browse files Browse the repository at this point in the history
  • Loading branch information
imWildCat committed Feb 18, 2023
1 parent 1ff5211 commit 9baa530
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/services/webdav/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,17 @@ impl Accessor for WebdavBackend {
DirStream::new(&self.root, path, result, args.limit()),
))
}
StatusCode::NOT_FOUND if path.ends_with('/') => Ok((
RpList::default(),
DirStream::new(
&self.root,
path,
Multistatus {
response: Vec::new(),
},
args.limit(),
),
)),
_ => Err(parse_error(resp).await?),
}
}
Expand Down Expand Up @@ -482,6 +493,10 @@ impl WebdavBackend {
let p = build_abs_path(&self.root, path);

let url = format!("{}/{}", self.endpoint, percent_encode_path(&p));
println!(
"webdav url: {} first: {}, second: {}",
url, self.endpoint, p
);
let mut req = Request::builder()
.method("PROPFIND")
.uri(&url)
Expand Down

0 comments on commit 9baa530

Please sign in to comment.