diff options
author | Jason A. Donenfeld | 2016-01-14 14:31:53 +0100 |
---|---|---|
committer | Jason A. Donenfeld | 2016-01-14 14:31:53 +0100 |
commit | 92996ac2a6fc4e944c3d723e12d5ab244a43508e (patch) | |
tree | ee7f420c6612fdc0dd64031631ed53b8ce626c2e | |
parent | 1c581a072651524f3b0d91f33e22a42c4166dd96 (diff) | |
download | cgit-92996ac2a6fc4e944c3d723e12d5ab244a43508e.tar.gz |
ui-blob: always use generic mimetypes
Diffstat (limited to '')
-rw-r--r-- | ui-blob.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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); |