Skip to content

Commit 2f3f9f0

Browse files
committed
feat: Add support for WebDAV methods in HTTP framework
1 parent f199b02 commit 2f3f9f0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

crates/theater/src/host/framework/http_framework.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ fn is_valid_host(host: &str) -> bool {
6464
fn is_valid_method(method: &str) -> bool {
6565
match method {
6666
"GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | "CONNECT" | "TRACE"
67-
| "*" => true,
67+
| "*"
68+
// WebDAV methods for git-http-push and WebDAV protocol support
69+
| "LOCK" | "UNLOCK" | "MKCOL" | "COPY" | "MOVE" | "PROPFIND" | "PROPPATCH" => true,
6870
_ => false,
6971
}
7072
}

crates/theater/src/host/framework/types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,7 @@ pub fn is_valid_method(method: &str) -> bool {
9999
matches!(
100100
method,
101101
"GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | "TRACE" | "CONNECT"
102+
// WebDAV methods for git-http-push and WebDAV protocol support
103+
| "LOCK" | "UNLOCK" | "MKCOL" | "COPY" | "MOVE" | "PROPFIND" | "PROPPATCH"
102104
)
103105
}

0 commit comments

Comments
 (0)