diff options
author | James Seward <james@jamesoff.net> | 2024-01-11 13:38:08 +0000 |
---|---|---|
committer | James Seward <james@jamesoff.net> | 2024-01-11 13:38:08 +0000 |
commit | c3fb6bab77f35be6cda261f257b8731d38e5265f (patch) | |
tree | 683be057b3f1b659648e0fdecaca59955fc785ab /httpd.c | |
parent | ca27d0248a9244b71f6c44e8f1b598111b17e846 (diff) |
Support DELETE for Mastodon subscriptions
While testing Mona, I noticed that after deleting my account entry for
my snac server, Mona would repeatedly try to delete the subscription it
thought it had created, resulting in many unhandled DELETE calls.
This accepts the call and returns 200 for it, which makes Mona happy.
Diffstat (limited to 'httpd.c')
-rw-r--r-- | httpd.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -344,6 +344,14 @@ void httpd_connection(FILE *f) if (strcmp(method, "OPTIONS") == 0) { status = 200; } + else + if (strcmp(method, "DELETE") == 0) { +#ifndef NO_MASTODON_API + if (status == 0) + status = mastoapi_delete_handler(req, q_path, + &body, &b_size, &ctype); +#endif + } /* unattended? it's an error */ if (status == 0) { |