Slon/Endpoints/Get/ActivityPub: Match json anywhere in Accept header

We shouldn't 404 if a client accepts many different content-types, or is
unnecessarily verbose, when requesting a user profile.
This commit is contained in:
Alec Murphy 2025-03-12 07:58:44 -04:00
parent 3faed0e966
commit 5f2ed89f61

View file

@ -1,4 +1,4 @@
if (String.BeginsWith("/users/", session->path()) && String.EndsWith("json", session->header("accept"))) { if (String.BeginsWith("/users/", session->path()) && !StrICmp("json", session->header("accept"))) {
@slon_activitypub_users_get(session); @slon_activitypub_users_get(session);
return; return;
} }