From f7120603edc6f2680ad01fdbe7b3dc7ddf1494ef Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 27 Sep 2026 21:02:41 -1000 Subject: Share the max-blob-size check and its refusal Five copies of the test and four of the error page had to agree by hand. The new check pins the four refusals, which no test covered. --- source/ui-shared.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/ui-shared.h') diff --git a/source/ui-shared.h b/source/ui-shared.h index c4b96a9..93cc9d2 100644 --- a/source/ui-shared.h +++ b/source/ui-shared.h @@ -97,6 +97,11 @@ extern void cgit_print_docend(void); __attribute__((format (printf,3,4))) extern void cgit_print_error_page(int code, const char *msg, const char *fmt, ...); extern void cgit_vprint_error_page(int code, const char *msg, const char *fmt, va_list ap); + +/* + * Answer with the error page for a blob of size bytes past max-blob-size. + */ +extern void cgit_print_blob_too_large(unsigned long size); extern void cgit_print_pageheader(void); extern void cgit_print_filemode(unsigned short mode); extern void cgit_print_snapshot_links(const struct cgit_repo *repo, const char *ref, -- cgit 2.12.1