Implement nonfunctional COPY and MOVE method

Fixes #69 for now
This commit is contained in:
Lennart
2025-06-10 17:42:03 +02:00
parent 103ac0b1f9
commit 32225bdda8
7 changed files with 112 additions and 28 deletions

View File

@@ -38,16 +38,6 @@ pub trait AxumMethods: Sized + Send + Sync + 'static {
None
}
#[inline]
fn copy() -> Option<MethodFunction<Self>> {
None
}
#[inline]
fn mv() -> Option<MethodFunction<Self>> {
None
}
#[inline]
fn put() -> Option<MethodFunction<Self>> {
None
@@ -58,6 +48,8 @@ pub trait AxumMethods: Sized + Send + Sync + 'static {
let mut allow = vec![
Method::from_str("PROPFIND").unwrap(),
Method::from_str("PROPPATCH").unwrap(),
Method::from_str("COPY").unwrap(),
Method::from_str("MOVE").unwrap(),
Method::DELETE,
Method::OPTIONS,
];
@@ -79,12 +71,6 @@ pub trait AxumMethods: Sized + Send + Sync + 'static {
if Self::mkcalendar().is_some() {
allow.push(Method::from_str("MKCALENDAR").unwrap());
}
if Self::copy().is_some() {
allow.push(Method::from_str("COPY").unwrap());
}
if Self::mv().is_some() {
allow.push(Method::from_str("MOVE").unwrap());
}
if Self::put().is_some() {
allow.push(Method::PUT);
}