summary refs log tree commit diff
path: root/ui-blob.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-01-14 14:31:53 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2016-01-14 14:31:53 +0100
commit92996ac2a6fc4e944c3d723e12d5ab244a43508e (patch)
treeee7f420c6612fdc0dd64031631ed53b8ce626c2e /ui-blob.c
parent1c581a072651524f3b0d91f33e22a42c4166dd96 (diff)
ui-blob: always use generic mimetypes
Diffstat (limited to 'ui-blob.c')
-rw-r--r--ui-blob.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ui-blob.c b/ui-blob.c
index 2cce11c..43a2f10 100644
--- a/ui-blob.c
+++ b/ui-blob.c
@@ -161,12 +161,10 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl
 	}
 
 	buf[size] = '\0';
-	if (!ctx.page.mimetype) {
-		if (buffer_is_binary(buf, size))
-			ctx.page.mimetype = "application/octet-stream";
-		else
-			ctx.page.mimetype = "text/plain";
-	}
+	if (buffer_is_binary(buf, size))
+		ctx.page.mimetype = "application/octet-stream";
+	else
+		ctx.page.mimetype = "text/plain";
 	ctx.page.filename = path;
 	cgit_print_http_headers();
 	html_raw(buf, size);