summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/mastoapi.c b/mastoapi.c
index c51c933..2413edb 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -175,6 +175,8 @@ const char *login_page = ""
175int oauth_get_handler(const xs_dict *req, const char *q_path, 175int oauth_get_handler(const xs_dict *req, const char *q_path,
176 char **body, int *b_size, char **ctype) 176 char **body, int *b_size, char **ctype)
177{ 177{
178 (void)b_size;
179
178 if (!xs_startswith(q_path, "/oauth/")) 180 if (!xs_startswith(q_path, "/oauth/"))
179 return 0; 181 return 0;
180 182
@@ -227,6 +229,9 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
227 const char *payload, int p_size, 229 const char *payload, int p_size,
228 char **body, int *b_size, char **ctype) 230 char **body, int *b_size, char **ctype)
229{ 231{
232 (void)p_size;
233 (void)b_size;
234
230 if (!xs_startswith(q_path, "/oauth/")) 235 if (!xs_startswith(q_path, "/oauth/"))
231 return 0; 236 return 0;
232 237
@@ -815,6 +820,8 @@ int process_auth_token(snac *snac, const xs_dict *req)
815int mastoapi_get_handler(const xs_dict *req, const char *q_path, 820int mastoapi_get_handler(const xs_dict *req, const char *q_path,
816 char **body, int *b_size, char **ctype) 821 char **body, int *b_size, char **ctype)
817{ 822{
823 (void)b_size;
824
818 if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/")) 825 if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/"))
819 return 0; 826 return 0;
820 827
@@ -1474,6 +1481,9 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
1474 const char *payload, int p_size, 1481 const char *payload, int p_size,
1475 char **body, int *b_size, char **ctype) 1482 char **body, int *b_size, char **ctype)
1476{ 1483{
1484 (void)p_size;
1485 (void)b_size;
1486
1477 if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/")) 1487 if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/"))
1478 return 0; 1488 return 0;
1479 1489
@@ -1898,6 +1908,9 @@ int mastoapi_put_handler(const xs_dict *req, const char *q_path,
1898 const char *payload, int p_size, 1908 const char *payload, int p_size,
1899 char **body, int *b_size, char **ctype) 1909 char **body, int *b_size, char **ctype)
1900{ 1910{
1911 (void)p_size;
1912 (void)b_size;
1913
1901 if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/")) 1914 if (!xs_startswith(q_path, "/api/v1/") && !xs_startswith(q_path, "/api/v2/"))
1902 return 0; 1915 return 0;
1903 1916