diff options
| author | 2024-06-09 16:56:54 +0200 | |
|---|---|---|
| committer | 2024-06-09 16:56:54 +0200 | |
| commit | c648fab797456a49d8bc50f3e17123c66f08bf0e (patch) | |
| tree | e9d2bb29431f7707fbca0d9316fef47a3ffcb3a6 /mastoapi.c | |
| parent | mastoapi: Added missing field in list creation. (diff) | |
| download | penes-snac2-c648fab797456a49d8bc50f3e17123c66f08bf0e.tar.gz penes-snac2-c648fab797456a49d8bc50f3e17123c66f08bf0e.tar.xz penes-snac2-c648fab797456a49d8bc50f3e17123c66f08bf0e.zip | |
mastoapi: Reverted empty ctype rejection.
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 12 |
1 files changed, 0 insertions, 12 deletions
| @@ -243,9 +243,6 @@ int oauth_post_handler(const xs_dict *req, const char *q_path, | |||
| 243 | const char *i_ctype = xs_dict_get(req, "content-type"); | 243 | const char *i_ctype = xs_dict_get(req, "content-type"); |
| 244 | xs *args = NULL; | 244 | xs *args = NULL; |
| 245 | 245 | ||
| 246 | if (i_ctype == NULL) | ||
| 247 | return 0; | ||
| 248 | |||
| 249 | if (i_ctype && xs_startswith(i_ctype, "application/json")) { | 246 | if (i_ctype && xs_startswith(i_ctype, "application/json")) { |
| 250 | if (!xs_is_null(payload)) | 247 | if (!xs_is_null(payload)) |
| 251 | args = xs_json_loads(payload); | 248 | args = xs_json_loads(payload); |
| @@ -2415,9 +2412,6 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path, | |||
| 2415 | xs *args = NULL; | 2412 | xs *args = NULL; |
| 2416 | const char *i_ctype = xs_dict_get(req, "content-type"); | 2413 | const char *i_ctype = xs_dict_get(req, "content-type"); |
| 2417 | 2414 | ||
| 2418 | if (i_ctype == NULL) | ||
| 2419 | return 0; | ||
| 2420 | |||
| 2421 | if (i_ctype && xs_startswith(i_ctype, "application/json")) { | 2415 | if (i_ctype && xs_startswith(i_ctype, "application/json")) { |
| 2422 | if (!xs_is_null(payload)) | 2416 | if (!xs_is_null(payload)) |
| 2423 | args = xs_json_loads(payload); | 2417 | args = xs_json_loads(payload); |
| @@ -3098,9 +3092,6 @@ int mastoapi_put_handler(const xs_dict *req, const char *q_path, | |||
| 3098 | xs *args = NULL; | 3092 | xs *args = NULL; |
| 3099 | const char *i_ctype = xs_dict_get(req, "content-type"); | 3093 | const char *i_ctype = xs_dict_get(req, "content-type"); |
| 3100 | 3094 | ||
| 3101 | if (i_ctype == NULL) | ||
| 3102 | return 0; | ||
| 3103 | |||
| 3104 | if (i_ctype && xs_startswith(i_ctype, "application/json")) { | 3095 | if (i_ctype && xs_startswith(i_ctype, "application/json")) { |
| 3105 | if (!xs_is_null(payload)) | 3096 | if (!xs_is_null(payload)) |
| 3106 | args = xs_json_loads(payload); | 3097 | args = xs_json_loads(payload); |
| @@ -3248,9 +3239,6 @@ int mastoapi_patch_handler(const xs_dict *req, const char *q_path, | |||
| 3248 | xs *args = NULL; | 3239 | xs *args = NULL; |
| 3249 | const char *i_ctype = xs_dict_get(req, "content-type"); | 3240 | const char *i_ctype = xs_dict_get(req, "content-type"); |
| 3250 | 3241 | ||
| 3251 | if (i_ctype == NULL) | ||
| 3252 | return 0; | ||
| 3253 | |||
| 3254 | if (i_ctype && xs_startswith(i_ctype, "application/json")) { | 3242 | if (i_ctype && xs_startswith(i_ctype, "application/json")) { |
| 3255 | if (!xs_is_null(payload)) | 3243 | if (!xs_is_null(payload)) |
| 3256 | args = xs_json_loads(payload); | 3244 | args = xs_json_loads(payload); |