]> granicus.if.org Git - cgit/commitdiff
snapshot: use cgit_print_error_page() instead of html_status()
authorJohn Keeping <john@keeping.me.uk>
Fri, 14 Aug 2015 11:47:05 +0000 (12:47 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 14 Aug 2015 13:46:51 +0000 (15:46 +0200)
This provides a formatted error response rather than a simple HTTP
error.

Signed-off-by: John Keeping <john@keeping.me.uk>
ui-snapshot.c

index cb34f4b59c84cc61aeef210095bec9118537524a..bf4bcd7b6fa9d90bbeadc6a6f548954bfe3134e2 100644 (file)
@@ -213,7 +213,7 @@ void cgit_print_snapshot(const char *head, const char *hex,
        if (!hex && dwim) {
                hex = get_ref_from_filename(ctx.repo->url, filename, f);
                if (hex == NULL) {
-                       html_status(404, "Not found", 0);
+                       cgit_print_error_page(404, "Not found", "Not found");
                        return;
                }
                prefix = xstrdup(filename);