mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 00:59:02 +03:00
refactor: remove sabredav-partialupdate from DAV res header (#415)
This commit is contained in:
@@ -1717,10 +1717,8 @@ fn set_webdav_headers(res: &mut Response) {
|
|||||||
"Allow",
|
"Allow",
|
||||||
HeaderValue::from_static("GET,HEAD,PUT,OPTIONS,DELETE,PATCH,PROPFIND,COPY,MOVE"),
|
HeaderValue::from_static("GET,HEAD,PUT,OPTIONS,DELETE,PATCH,PROPFIND,COPY,MOVE"),
|
||||||
);
|
);
|
||||||
res.headers_mut().insert(
|
res.headers_mut()
|
||||||
"DAV",
|
.insert("DAV", HeaderValue::from_static("1, 2, 3"));
|
||||||
HeaderValue::from_static("1, 2, 3, sabredav-partialupdate"),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn get_content_type(path: &Path) -> Result<String> {
|
async fn get_content_type(path: &Path) -> Result<String> {
|
||||||
|
|||||||
@@ -267,10 +267,7 @@ fn options_dir(server: TestServer) -> Result<(), Error> {
|
|||||||
resp.headers().get("allow").unwrap(),
|
resp.headers().get("allow").unwrap(),
|
||||||
"GET,HEAD,PUT,OPTIONS,DELETE,PATCH,PROPFIND,COPY,MOVE"
|
"GET,HEAD,PUT,OPTIONS,DELETE,PATCH,PROPFIND,COPY,MOVE"
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(resp.headers().get("dav").unwrap(), "1, 2, 3");
|
||||||
resp.headers().get("dav").unwrap(),
|
|
||||||
"1, 2, 3, sabredav-partialupdate"
|
|
||||||
);
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user