[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cgit
Subject:    [PATCH 05/17] snapshot: use cgit_print_error_page() instead of html_status()
From:       John Keeping <john () keeping ! me ! uk>
Date:       2015-04-05 15:54:51
Message-ID: f01ec3c8669fdc8209d1dd195d8ede7e0b78182e.1428248621.git.john () keeping ! me ! uk
[Download RAW message or body]

This provides a formatted error response rather than a simple HTTP
error.

Signed-off-by: John Keeping <john@keeping.me.uk>
---
 ui-snapshot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui-snapshot.c b/ui-snapshot.c
index cb34f4b..bf4bcd7 100644
--- a/ui-snapshot.c
+++ b/ui-snapshot.c
@@ -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);
-- 
2.4.0.rc0.173.gb1cefcc

_______________________________________________
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic