diff options
Diffstat (limited to 'ui-plain.c')
-rw-r--r-- | ui-plain.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -66,13 +66,13 @@ static int print_object(const unsigned char *sha1, const char *path) | |||
66 | 66 | ||
67 | type = sha1_object_info(sha1, &size); | 67 | type = sha1_object_info(sha1, &size); |
68 | if (type == OBJ_BAD) { | 68 | if (type == OBJ_BAD) { |
69 | html_status(404, "Not found", 0); | 69 | cgit_print_error_page(404, "Not found", "Not found"); |
70 | return 0; | 70 | return 0; |
71 | } | 71 | } |
72 | 72 | ||
73 | buf = read_sha1_file(sha1, &type, &size); | 73 | buf = read_sha1_file(sha1, &type, &size); |
74 | if (!buf) { | 74 | if (!buf) { |
75 | html_status(404, "Not found", 0); | 75 | cgit_print_error_page(404, "Not found", "Not found"); |
76 | return 0; | 76 | return 0; |
77 | } | 77 | } |
78 | ctx.page.mimetype = NULL; | 78 | ctx.page.mimetype = NULL; |
@@ -225,12 +225,12 @@ void cgit_print_plain(void) | |||
225 | rev = ctx.qry.head; | 225 | rev = ctx.qry.head; |
226 | 226 | ||
227 | if (get_sha1(rev, sha1)) { | 227 | if (get_sha1(rev, sha1)) { |
228 | html_status(404, "Not found", 0); | 228 | cgit_print_error_page(404, "Not found", "Not found"); |
229 | return; | 229 | return; |
230 | } | 230 | } |
231 | commit = lookup_commit_reference(sha1); | 231 | commit = lookup_commit_reference(sha1); |
232 | if (!commit || parse_commit(commit)) { | 232 | if (!commit || parse_commit(commit)) { |
233 | html_status(404, "Not found", 0); | 233 | cgit_print_error_page(404, "Not found", "Not found"); |
234 | return; | 234 | return; |
235 | } | 235 | } |
236 | if (!path_items.match) { | 236 | if (!path_items.match) { |
@@ -243,7 +243,7 @@ void cgit_print_plain(void) | |||
243 | walk_tree_ctx.match_baselen = basedir_len(path_items.match); | 243 | walk_tree_ctx.match_baselen = basedir_len(path_items.match); |
244 | read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); | 244 | read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); |
245 | if (!walk_tree_ctx.match) | 245 | if (!walk_tree_ctx.match) |
246 | html_status(404, "Not found", 0); | 246 | cgit_print_error_page(404, "Not found", "Not found"); |
247 | else if (walk_tree_ctx.match == 2) | 247 | else if (walk_tree_ctx.match == 2) |
248 | print_dir_tail(); | 248 | print_dir_tail(); |
249 | } | 249 | } |