]> code.citadel.org Git - citadel.git/blobdiff - webcit-ng/server/request.c
Skeleton code for filters.
[citadel.git] / webcit-ng / server / request.c
index 6622c28b108f70a54ec904019b91ad907ba86d54..bd1b3253888e1f8d96968c41d842daf51ea05915 100644 (file)
@@ -6,8 +6,7 @@
 //
 // Copyright (c) 1996-2023 by the citadel.org team
 //
-// This program is open source software.  Use, duplication, or
-// disclosure are subject to the GNU General Public License v3.
+// This program is open source software.  Use, duplication, or disclosure is subject to the GNU General Public License v3.
 
 #include "webcit.h"
 
@@ -22,6 +21,13 @@ void do_404(struct http_transaction *h) {
 }
 
 
+// Method not allowed
+void do_405(struct http_transaction *h) {
+       h->response_code = 412;
+       h->response_string = strdup("METHOD NOT ALLOWED");
+}
+
+
 // Precondition failed (such as if-match)
 void do_412(struct http_transaction *h) {
        h->response_code = 412;
@@ -162,6 +168,9 @@ void perform_request(struct http_transaction *h) {
        case 'u':               // /ctdl/u/ == RESTful path to users
                ctdl_u(h, c);
                break;
+       case 'p':               // /ctdl/p/ == RESTful path to upload functions
+               ctdl_p(h, c);
+               break;
        default:
                do_404(h);
        }