diff options
Diffstat (limited to 'httpd.c')
| -rw-r--r-- | httpd.c | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -183,17 +183,21 @@ void httpd_connection(FILE *f) | |||
| 183 | if (status == 0) | 183 | if (status == 0) |
| 184 | status = activitypub_get_handler(req, q_path, &body, &b_size, &ctype); | 184 | status = activitypub_get_handler(req, q_path, &body, &b_size, &ctype); |
| 185 | 185 | ||
| 186 | #ifndef NO_MASTODON_API | ||
| 186 | if (status == 0) | 187 | if (status == 0) |
| 187 | status = oauth_get_handler(req, q_path, &body, &b_size, &ctype); | 188 | status = oauth_get_handler(req, q_path, &body, &b_size, &ctype); |
| 188 | 189 | ||
| 189 | if (status == 0) | 190 | if (status == 0) |
| 190 | status = mastoapi_get_handler(req, q_path, &body, &b_size, &ctype); | 191 | status = mastoapi_get_handler(req, q_path, &body, &b_size, &ctype); |
| 192 | #endif /* NO_MASTODON_API */ | ||
| 191 | 193 | ||
| 192 | if (status == 0) | 194 | if (status == 0) |
| 193 | status = html_get_handler(req, q_path, &body, &b_size, &ctype); | 195 | status = html_get_handler(req, q_path, &body, &b_size, &ctype); |
| 194 | } | 196 | } |
| 195 | else | 197 | else |
| 196 | if (strcmp(method, "POST") == 0) { | 198 | if (strcmp(method, "POST") == 0) { |
| 199 | |||
| 200 | #ifndef NO_MASTODON_API | ||
| 197 | if (status == 0) | 201 | if (status == 0) |
| 198 | status = oauth_post_handler(req, q_path, | 202 | status = oauth_post_handler(req, q_path, |
| 199 | payload, p_size, &body, &b_size, &ctype); | 203 | payload, p_size, &body, &b_size, &ctype); |
| @@ -201,6 +205,7 @@ void httpd_connection(FILE *f) | |||
| 201 | if (status == 0) | 205 | if (status == 0) |
| 202 | status = mastoapi_post_handler(req, q_path, | 206 | status = mastoapi_post_handler(req, q_path, |
| 203 | payload, p_size, &body, &b_size, &ctype); | 207 | payload, p_size, &body, &b_size, &ctype); |
| 208 | #endif | ||
| 204 | 209 | ||
| 205 | if (status == 0) | 210 | if (status == 0) |
| 206 | status = activitypub_post_handler(req, q_path, | 211 | status = activitypub_post_handler(req, q_path, |