From b3af60308378aaf0e5f1cf38948fc560a4298f6b Mon Sep 17 00:00:00 2001 From: grunfink Date: Thu, 6 Aug 2026 19:00:20 +0200 Subject: Fixed redirection loop in the /users special case. --- httpd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/httpd.c b/httpd.c index 216c29c..5b503b9 100644 --- a/httpd.c +++ b/httpd.c @@ -504,9 +504,9 @@ void httpd_connection(FILE *f) q_path = xs_crop_i(q_path, strlen(p), 0); /* add users endpoint redirection mimic Mastodon behaviour */ - const char *users_endpoint = "/users"; + const char *users_endpoint = "/users/"; if (xs_startswith(q_path, users_endpoint)) { - q_path = xs_crop_i(q_path, strlen(users_endpoint), 0); + q_path = xs_crop_i(q_path, strlen(users_endpoint) - 1, 0); status = HTTP_STATUS_FOUND; } -- cgit