neocgit

a more 'modern' version of cgit
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/neocgit

commit 92996ac2a6fc4e944c3d723e12d5ab244a43508e
parent 1c581a072651524f3b0d91f33e22a42c4166dd96
Author: Jason A. Donenfeld <Jason@zx2c4.com>
Date:   Thu, 14 Jan 2016 14:31:53 +0100

ui-blob: always use generic mimetypes

Diffstat:
Mui-blob.c | 10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git 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);