diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2025-03-24 22:16:32 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska@appnovation.com> | 2025-03-24 22:16:32 +0000 |
| commit | fc3255cf6939d22cc54240c5c9be1fddcfea8beb (patch) | |
| tree | 03aa4f093d6e21981b4fbf10d3edb4c63e9fc352 /src/tipideed/tipideed.c | |
| parent | 7adb5cfb425dd927b3e78f1a9da75d825f6a3904 (diff) | |
| download | tipidee-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/tipideed.c')
| -rw-r--r-- | src/tipideed/tipideed.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tipideed/tipideed.c b/src/tipideed/tipideed.c index 35abdf2..4c226cb 100644 --- a/src/tipideed/tipideed.c +++ b/src/tipideed/tipideed.c @@ -458,7 +458,7 @@ int main (int argc, char const *const *argv, char const *const *envp) } x = tipidee_headers_search(&hdr, "Transfer-Encoding") ; - if (x) + if (rql.http_minor && x) { if (strcasecmp(x, "chunked")) eexit_400(&rql, "unsupported Transfer-Encoding") ; else tcoding = TIPIDEE_TRANSFERCODING_CHUNKED ; @@ -483,12 +483,13 @@ int main (int argc, char const *const *argv, char const *const *envp) case TIPIDEE_METHOD_GET : case TIPIDEE_METHOD_HEAD : case TIPIDEE_METHOD_POST : - case TIPIDEE_METHOD_TRACE : break ; + case TIPIDEE_METHOD_TRACE : + case TIPIDEE_METHOD_PUT : + case TIPIDEE_METHOD_DELETE : + case TIPIDEE_METHOD_PATCH : break ; case TIPIDEE_METHOD_OPTIONS : if (!rql.uri.path) { respond_options(&rql, 1) ; continue ; } break ; - case TIPIDEE_METHOD_PUT : - case TIPIDEE_METHOD_DELETE : eexit_405(&rql) ; case TIPIDEE_METHOD_CONNECT : eexit_501(&rql, "CONNECT method unsupported") ; case TIPIDEE_METHOD_PRI : eexit_501(&rql, "PRI method attempted with HTTP version 1") ; default : strerr_dief2x(101, "can't happen: ", "unknown HTTP method") ; |
