From 9da21a51cb773d2cfaea761ae524359452de6d9a Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 13:21:45 -0700 Subject: Pick a blob's mimetype the way the plain page does --- source/ui-blob.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/ui-blob.c b/source/ui-blob.c index 0c90c42..948b348 100644 --- a/source/ui-blob.c +++ b/source/ui-blob.c @@ -210,10 +210,7 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl return; } - if (buffer_is_binary(buf, size)) - ctx.page.mimetype = "application/octet-stream"; - else - ctx.page.mimetype = "text/plain"; + ctx.page.mimetype = buffer_is_binary(buf, size) ? "application/octet-stream" : "text/plain"; ctx.page.filename = path; ctx.page.untrusted = 1; cgit_print_http_headers(); -- cgit