]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-blob.c
Print an error if filename is not found in html_include.
[ps-cgit] / ui-blob.c
index bd44574e4caf07af4d25ed135e4abb05a4bc0349..ab44659a93bb1b66d98ff2bf110de2838e0c39a5 100644 (file)
--- a/ui-blob.c
+++ b/ui-blob.c
@@ -8,8 +8,9 @@
 
 #include "cgit.h"
 #include "html.h"
+#include "ui-shared.h"
 
-void cgit_print_blob(struct cacheitem *item, const char *hex, char *path)
+void cgit_print_blob(const char *hex, char *path)
 {
 
        unsigned char sha1[20];
@@ -35,7 +36,7 @@ void cgit_print_blob(struct cacheitem *item, const char *hex, char *path)
        }
 
        buf[size] = '\0';
-       ctx.page.mimetype = "text/plain";
+       ctx.page.mimetype = NULL;
        ctx.page.filename = path;
        cgit_print_http_headers(&ctx);
        write(htmlfd, buf, size);