From fc3255cf6939d22cc54240c5c9be1fddcfea8beb Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 24 Mar 2025 22:16:32 +0000 Subject: Add PATCH support, accept PUT/DELETE/PATCH on cgi Signed-off-by: Laurent Bercot --- src/tipideed/errors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tipideed/errors.c') diff --git a/src/tipideed/errors.c b/src/tipideed/errors.c index 9b00f3b..edde934 100644 --- a/src/tipideed/errors.c +++ b/src/tipideed/errors.c @@ -38,7 +38,7 @@ void response_error_early_plus_and_exit (tipidee_rql const *rql, unsigned int st void eexit_405 (tipidee_rql const *rql) { - static tipidee_response_header const allowpost = { .key = "Allow", .value = "GET, HEAD, POST", .options = 0 } ; + static tipidee_response_header const allowpost = { .key = "Allow", .value = "GET, HEAD, POST, PUT, DELETE, PATCH", .options = 0 } ; response_error_early_plus_and_exit(rql, 405, "Method Not Allowed", "Invalid method for the resource.", &allowpost, 1) ; } @@ -127,7 +127,7 @@ void response_error_plus_and_die (tipidee_rql const *rql, int e, char const *doc void exit_405 (tipidee_rql const *rql, char const *docroot, uint32_t options) { - tipidee_response_header hd = { .key = "Allow", .value = options & 1 ? "GET, HEAD, POST" : "GET, HEAD", .options = 0 } ; + tipidee_response_header hd = { .key = "Allow", .value = options & 1 ? "GET, HEAD, POST, PUT, DELETE, PATCH" : "GET, HEAD", .options = 0 } ; response_error_plus_and_exit(rql, docroot, 405, &hd, 1) ; } -- cgit v1.3.1