From 8ecab78448dcbea8bdd727471f54dabb99094179 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 22 Aug 2026 10:34:55 -0700 Subject: Keep error pages out of the cache --- source/cgit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/cgit.c') diff --git a/source/cgit.c b/source/cgit.c index ac8922b..12981c2 100644 --- a/source/cgit.c +++ b/source/cgit.c @@ -82,9 +82,8 @@ static void isolate_git_environment(void) */ static NORETURN void die_routine(const char *msg, va_list params) { - // A page is rendered with stdout pointed at the cache file, so the - // message would otherwise be written there instead of to the visitor. - cache_abandon_fill(); + // The error page abandons any cache fill in progress, so the message + // reaches the visitor rather than the cache file stdout points at. cgit_vprint_error_page(400, "Bad request", msg, params); exit(0); } -- cgit v2.8.0