From edb59dafb0c11345d563db1e78e4cdb6c1d80d3d Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Wed, 19 Aug 2026 00:46:22 -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 2.12.1