From e5b326b5130462556476d082e03dd85f90e7411f Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Thu, 27 Aug 2026 05:42:02 -1000 Subject: Use standard HTTP reason phrases --- source/ui-plain.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/ui-plain.c') diff --git a/source/ui-plain.c b/source/ui-plain.c index 7e30694..b63b9c6 100644 --- a/source/ui-plain.c +++ b/source/ui-plain.c @@ -56,7 +56,7 @@ static int print_object(const struct object_id *oid, const char *path) type = odb_read_object_info(the_repository->objects, oid, &size); if (type == OBJ_BAD) { - cgit_print_error_page(404, "Not found", "Not found"); + cgit_print_error_page(404, "Not Found", "Not found"); return 1; } @@ -64,7 +64,7 @@ static int print_object(const struct object_id *oid, const char *path) // blob is kept out of memory rather than noticed once it is there. if (ctx.cfg.max_blob_size && size / 1024 > (unsigned long)ctx.cfg.max_blob_size) { - cgit_print_error_page(413, "Too large", + cgit_print_error_page(413, "Content Too Large", "Object size (%luKB) exceeds limit (%dKB)", size / 1024, ctx.cfg.max_blob_size); return 1; @@ -72,7 +72,7 @@ static int print_object(const struct object_id *oid, const char *path) buf = odb_read_object(the_repository->objects, oid, &type, &size); if (!buf) { - cgit_print_error_page(404, "Not found", "Not found"); + cgit_print_error_page(404, "Not Found", "Not found"); return 1; } @@ -238,12 +238,12 @@ void cgit_print_plain(void) rev = ctx.qry.head; if (repo_get_oid(the_repository, rev, &oid)) { - cgit_print_error_page(404, "Not found", "Not found"); + cgit_print_error_page(404, "Not Found", "Not found"); return; } commit = lookup_commit_reference(the_repository, &oid); if (!commit || repo_parse_commit(the_repository, commit)) { - cgit_print_error_page(404, "Not found", "Not found"); + cgit_print_error_page(404, "Not Found", "Not found"); return; } if (!path_items.match) { @@ -259,7 +259,7 @@ void cgit_print_plain(void) read_tree(the_repository, repo_get_commit_tree(the_repository, commit), &paths, walk_tree, &walk); if (walk.response == RESPONSE_NONE) - cgit_print_error_page(404, "Not found", "Not found"); + cgit_print_error_page(404, "Not Found", "Not found"); else if (walk.response == RESPONSE_LISTING) print_dir_tail(); } -- cgit v2.8.0