]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-blob.c
Add separate header-files for each page/view
[ps-cgit] / ui-blob.c
index be4fb88b690bbb04beb9fd371b1df2bcbe12a8d2..3b291329a481f032fc8052e4b885aec2affbf695 100644 (file)
--- a/ui-blob.c
+++ b/ui-blob.c
@@ -9,7 +9,7 @@
 #include "cgit.h"
 #include "html.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,6 +35,8 @@ void cgit_print_blob(struct cacheitem *item, const char *hex, char *path)
        }
 
        buf[size] = '\0';
-       cgit_print_snapshot_start("text/plain", path, item);
+       ctx.page.mimetype = "text/plain";
+       ctx.page.filename = path;
+       cgit_print_http_headers(&ctx);
        write(htmlfd, buf, size);
 }