Diff options
Diffstat (limited to 'source/ui-blob.c')
-rw-r--r--source/ui-blob.c5
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();