diff options
author | John Keeping | 2015-08-14 12:47:05 +0100 |
---|---|---|
committer | Jason A. Donenfeld | 2015-08-14 15:46:51 +0200 |
commit | 048f195eaf2fedb56987f0c8c89b9fd46375aa87 (patch) | |
tree | 5237a3f9cce0cd4c55734a0112af1c2d15f02275 | |
parent | plain: use cgit_print_error_page() instead of html_status() (diff) | |
download | cgit-048f195eaf2fedb56987f0c8c89b9fd46375aa87.tar.gz cgit-048f195eaf2fedb56987f0c8c89b9fd46375aa87.zip |
snapshot: use cgit_print_error_page() instead of html_status()
This provides a formatted error response rather than a simple HTTP error. Signed-off-by: John Keeping <john@keeping.me.uk>
-rw-r--r-- | ui-snapshot.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, | |||
213 | if (!hex && dwim) { | 213 | if (!hex && dwim) { |
214 | hex = get_ref_from_filename(ctx.repo->url, filename, f); | 214 | hex = get_ref_from_filename(ctx.repo->url, filename, f); |
215 | if (hex == NULL) { | 215 | if (hex == NULL) { |
216 | html_status(404, "Not found", 0); | 216 | cgit_print_error_page(404, "Not found", "Not found"); |
217 | return; | 217 | return; |
218 | } | 218 | } |
219 | prefix = xstrdup(filename); | 219 | prefix = xstrdup(filename); |