summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-06-09 16:56:54 +0200
committerdefault <nobody@localhost>2024-06-09 16:56:54 +0200
commitc648fab797456a49d8bc50f3e17123c66f08bf0e (patch)
treee9d2bb29431f7707fbca0d9316fef47a3ffcb3a6
parent6e8adc86d00dccb9d6569336e6f208226c6bed22 (diff)
mastoapi: Reverted empty ctype rejection.
-rw-r--r--mastoapi.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 7413afa..be477c3 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -243,9 +243,6 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
const char *i_ctype = xs_dict_get(req, "content-type");
xs *args = NULL;
- if (i_ctype == NULL)
- return 0;
-
if (i_ctype && xs_startswith(i_ctype, "application/json")) {
if (!xs_is_null(payload))
args = xs_json_loads(payload);
@@ -2415,9 +2412,6 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
xs *args = NULL;
const char *i_ctype = xs_dict_get(req, "content-type");
- if (i_ctype == NULL)
- return 0;
-
if (i_ctype && xs_startswith(i_ctype, "application/json")) {
if (!xs_is_null(payload))
args = xs_json_loads(payload);
@@ -3098,9 +3092,6 @@ int mastoapi_put_handler(const xs_dict *req, const char *q_path,
xs *args = NULL;
const char *i_ctype = xs_dict_get(req, "content-type");
- if (i_ctype == NULL)
- return 0;
-
if (i_ctype && xs_startswith(i_ctype, "application/json")) {
if (!xs_is_null(payload))
args = xs_json_loads(payload);
@@ -3248,9 +3239,6 @@ int mastoapi_patch_handler(const xs_dict *req, const char *q_path,
xs *args = NULL;
const char *i_ctype = xs_dict_get(req, "content-type");
- if (i_ctype == NULL)
- return 0;
-
if (i_ctype && xs_startswith(i_ctype, "application/json")) {
if (!xs_is_null(payload))
args = xs_json_loads(payload);