-rw-r--r-- | ui-blob.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -30,11 +30,13 @@ void cgit_print_blob(struct cacheitem *item, const char *hex, char *path) buf = read_sha1_file(sha1, &type, &size); if (!buf) { cgit_print_error(fmt("Error reading object %s", hex)); return; } 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); } |