From f0346bcb01e335a8ef65412da1e06a917e7b34bb Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Thu, 1 Oct 2026 19:39:14 -1000 Subject: End a request quietly when the client has gone A write that failed with EPIPE on an uncached page died into an error page, which died again at exit when the page could not be sent either, and git logged a recursion warning on every dropped connection. A filter that exits early fails a write the same way, so the quiet exit is kept for writes that reach the client itself. --- source/filter.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/filter.c') diff --git a/source/filter.c b/source/filter.c index dd1eaf0..6e16537 100644 --- a/source/filter.c +++ b/source/filter.c @@ -450,6 +450,11 @@ void cgit_abort_filters(void) #endif } +int cgit_filter_holds_stdout(void) +{ + return running_exec != NULL; +} + static const struct { const char *prefix; struct cgit_filter *(*create)(const char *cmd, int argument_count); -- cgit v2.8.0