From 7adb5cfb425dd927b3e78f1a9da75d825f6a3904 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 24 Mar 2025 21:56:42 +0000 Subject: Respect HEAD in cgi Signed-off-by: Laurent Bercot --- src/tipideed/tipideed.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/tipideed/tipideed.c') diff --git a/src/tipideed/tipideed.c b/src/tipideed/tipideed.c index a5f9fcd..35abdf2 100644 --- a/src/tipideed/tipideed.c +++ b/src/tipideed/tipideed.c @@ -292,7 +292,9 @@ static inline int serve (tipidee_rql *rql, char const *docroot, char *uribuf, ti if (!(ra.flags & TIPIDEE_RA_FLAG_CGI)) { if (infopath[0]) { respond_404(rql, docroot) ; return 0 ; } - if (rql->m == TIPIDEE_METHOD_POST) exit_405(rql, docroot, 0) ; + if (rql->m != TIPIDEE_METHOD_GET + && rql->m != TIPIDEE_METHOD_HEAD + && rql->m != TIPIDEE_METHOD_OPTIONS) exit_405(rql, docroot, 0) ; } if (rql->m == TIPIDEE_METHOD_OPTIONS) -- cgit v1.3.1