all repos — cgit @ 1c581a072651524f3b0d91f33e22a42c4166dd96

a hyperfast web frontend for git written in c

ui-blob: Do not accept mimetype from user
Jason A. Donenfeld Jason@zx2c4.com
Thu, 14 Jan 2016 14:31:13 +0100
commit

1c581a072651524f3b0d91f33e22a42c4166dd96

parent

513b3863d999f91b47d7e9f26710390db55f9463

3 files changed, 0 insertions(+), 4 deletions(-)

jump to
M cgit.ccgit.c

@@ -314,8 +314,6 @@ } else if (!strcmp(name, "path")) {

ctx.qry.path = trim_end(value, '/'); } else if (!strcmp(name, "name")) { ctx.qry.name = xstrdup(value); - } else if (!strcmp(name, "mimetype")) { - ctx.qry.mimetype = xstrdup(value); } else if (!strcmp(name, "s")) { ctx.qry.sort = xstrdup(value); } else if (!strcmp(name, "showmsg")) {
M cgit.hcgit.h

@@ -173,7 +173,6 @@ char *sha1;

char *sha2; char *path; char *name; - char *mimetype; char *url; char *period; int ofs;
M ui-blob.cui-blob.c

@@ -161,7 +161,6 @@ return;

} buf[size] = '\0'; - ctx.page.mimetype = ctx.qry.mimetype; if (!ctx.page.mimetype) { if (buffer_is_binary(buf, size)) ctx.page.mimetype = "application/octet-stream";