diff options
context:
space:
mode:
Diffstat (limited to 'source/ui-plain.c')
-rw-r--r--source/ui-plain.c10
1 file changed, 2 insertions, 8 deletions
diff --git a/source/ui-plain.c b/source/ui-plain.c
index 7db6e07..6d02051 100644
--- a/source/ui-plain.c
+++ b/source/ui-plain.c
@@ -81,14 +81,8 @@ static void print_object(const struct object_id *oid, const char *path)
ctx.page.mimetype = NULL;
}
- if (!ctx.page.mimetype) {
- if (buffer_is_binary(buf, size)) {
- ctx.page.mimetype = "application/octet-stream";
- ctx.page.charset = NULL;
- } else {
- ctx.page.mimetype = "text/plain";
- }
- }
+ if (!ctx.page.mimetype)
+ ctx.page.mimetype = buffer_is_binary(buf, size) ? "application/octet-stream" : "text/plain";
ctx.page.filename = path;
ctx.page.size = size;
cgit_print_http_headers();