commit c648fab

default  ·  2024-06-09 14:56:54 +0000 UTC
parent 6e8adc8
mastoapi: Reverted empty ctype rejection.
1 files changed,  +0, -12
+0, -12
 1@@ -243,9 +243,6 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
 2     const char *i_ctype = xs_dict_get(req, "content-type");
 3     xs *args      = NULL;
 4 
 5-    if (i_ctype == NULL)
 6-        return 0;
 7-
 8     if (i_ctype && xs_startswith(i_ctype, "application/json")) {
 9         if (!xs_is_null(payload))
10             args = xs_json_loads(payload);
11@@ -2415,9 +2412,6 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
12     xs *args      = NULL;
13     const char *i_ctype = xs_dict_get(req, "content-type");
14 
15-    if (i_ctype == NULL)
16-        return 0;
17-
18     if (i_ctype && xs_startswith(i_ctype, "application/json")) {
19         if (!xs_is_null(payload))
20             args = xs_json_loads(payload);
21@@ -3098,9 +3092,6 @@ int mastoapi_put_handler(const xs_dict *req, const char *q_path,
22     xs *args      = NULL;
23     const char *i_ctype = xs_dict_get(req, "content-type");
24 
25-    if (i_ctype == NULL)
26-        return 0;
27-
28     if (i_ctype && xs_startswith(i_ctype, "application/json")) {
29         if (!xs_is_null(payload))
30             args = xs_json_loads(payload);
31@@ -3248,9 +3239,6 @@ int mastoapi_patch_handler(const xs_dict *req, const char *q_path,
32     xs *args      = NULL;
33     const char *i_ctype = xs_dict_get(req, "content-type");
34 
35-    if (i_ctype == NULL)
36-        return 0;
37-
38     if (i_ctype && xs_startswith(i_ctype, "application/json")) {
39         if (!xs_is_null(payload))
40             args = xs_json_loads(payload);