X-Git-Url: https://git.cameronkatri.com/cgit.git/blobdiff_plain/b1f9b9c1459cb9a30ebf80721aff6ef788d1f891..c6431a71508f1b61a95b01d85fe4534a0245e626:/ui-blob.c?ds=sidebyside diff --git a/ui-blob.c b/ui-blob.c index be4fb88..ab44659 100644 --- 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,6 +36,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 = NULL; + ctx.page.filename = path; + cgit_print_http_headers(&ctx); write(htmlfd, buf, size); }