feat: options method return status 200

This commit is contained in:
sigoden
2022-06-12 09:33:01 +08:00
parent 471bca86c6
commit dd8b21f3a6
2 changed files with 3 additions and 5 deletions

View File

@@ -129,7 +129,7 @@ fn head_file_404(server: TestServer) -> Result<(), Error> {
#[rstest]
fn options_dir(server: TestServer) -> Result<(), Error> {
let resp = fetch!(b"OPTIONS", format!("{}index.html", server.url())).send()?;
assert_eq!(resp.status(), 204);
assert_eq!(resp.status(), 200);
assert_eq!(
resp.headers().get("allow").unwrap(),
"GET,HEAD,PUT,OPTIONS,DELETE,PROPFIND,COPY,MOVE"