diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Keep error pages out of the cache
Diffstat (limited to '')
-rw-r--r--source/cgit.c5
1 file changed, 2 insertions, 3 deletions
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);
}