aboutsummaryrefslogtreecommitdiffstats
path: root/src/tipideed/errors.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2025-03-24 22:16:32 +0000
committerLaurent Bercot <ska@appnovation.com>2025-03-24 22:16:32 +0000
commitfc3255cf6939d22cc54240c5c9be1fddcfea8beb (patch)
tree03aa4f093d6e21981b4fbf10d3edb4c63e9fc352 /src/tipideed/errors.c
parent7adb5cfb425dd927b3e78f1a9da75d825f6a3904 (diff)
downloadtipidee-fc3255cf6939d22cc54240c5c9be1fddcfea8beb.tar.gz
Add PATCH support, accept PUT/DELETE/PATCH on cgi
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/tipideed/errors.c')
-rw-r--r--src/tipideed/errors.c4
1 files changed, 2 insertions, 2 deletions
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) ;
}