aboutsummaryrefslogtreecommitdiff
path: root/httpd.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-04-22 01:21:09 +0200
committerdefault <nobody@localhost>2023-04-22 01:21:09 +0200
commit88042277980edb34f5bc495dfc8b20a05cfe71c2 (patch)
tree670cbaebc367a6bc669c866f3e68ab4cc1cb7f2b /httpd.c
parent66d5acc8226ee9a2b2c047ad62b96a865894ce96 (diff)
New function mastoapi_put_handler().
Diffstat (limited to 'httpd.c')
-rw-r--r--httpd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/httpd.c b/httpd.c
index 3168323..79d489f 100644
--- a/httpd.c
+++ b/httpd.c
@@ -215,6 +215,16 @@ void httpd_connection(FILE *f)
status = html_post_handler(req, q_path,
payload, p_size, &body, &b_size, &ctype);
}
+ else
+ if (strcmp(method, "PUT") == 0) {
+
+#ifndef NO_MASTODON_API
+ if (status == 0)
+ status = mastoapi_put_handler(req, q_path,
+ payload, p_size, &body, &b_size, &ctype);
+#endif
+
+ }
/* let's go */
headers = xs_dict_new();