summaryrefslogtreecommitdiff
path: root/webfinger.c
diff options
context:
space:
mode:
authorgrunfink <grunfink@noreply.codeberg.org>2024-05-30 08:44:54 +0000
committergrunfink <grunfink@noreply.codeberg.org>2024-05-30 08:44:54 +0000
commitd56d4beb90f613b82ebf705a3e81a667b9601860 (patch)
tree5998501d0ea9a09f26db65e2d29fcb0927b5eee0 /webfinger.c
parent5bc2017ba065337dd15aa280ca0a43855b7b507b (diff)
parentaf8f1ef273e457318cb48f198e73c59e57373723 (diff)
Merge pull request 'Mastodon PATCH API for user profile updates' (#169) from louis77/snac2:master into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/169
Diffstat (limited to 'webfinger.c')
-rw-r--r--webfinger.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/webfinger.c b/webfinger.c
index c79fd44..0c18362 100644
--- a/webfinger.c
+++ b/webfinger.c
@@ -42,7 +42,7 @@ int webfinger_request_signed(snac *snac, const char *qs, char **actor, char **us
}
if (host == NULL || resource == NULL)
- return 400;
+ return HTTP_STATUS_BAD_REQUEST;
headers = xs_dict_append(headers, "accept", "application/json");
headers = xs_dict_append(headers, "user-agent", USER_AGENT);
@@ -139,7 +139,7 @@ int webfinger_get_handler(xs_dict *req, char *q_path,
const char *resource = xs_dict_get(q_vars, "resource");
if (resource == NULL)
- return 400;
+ return HTTP_STATUS_BAD_REQUEST;
snac snac;
int found = 0;
@@ -220,12 +220,12 @@ int webfinger_get_handler(xs_dict *req, char *q_path,
user_free(&snac);
- status = 200;
+ status = HTTP_STATUS_OK;
*body = j;
*ctype = "application/jrd+json";
}
else
- status = 404;
+ status = HTTP_STATUS_NOT_FOUND;
srv_debug(1, xs_fmt("webfinger_get_handler resource=%s %d", resource, status));