author | Lars Hjemli <hjemli@gmail.com> | 2010-08-22 11:29:57 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-08-22 11:29:57 (UTC) |
commit | 6d7552bc072599313ef423d69156d824c075572a (patch) (side-by-side diff) | |
tree | 3189efeb6ca80dc6dcf0811ff2d8011e2b3e8c7b /ui-plain.c | |
parent | 379e80e3a83481d3639c5d312eeddcce57c486b2 (diff) | |
download | cgit-6d7552bc072599313ef423d69156d824c075572a.zip cgit-6d7552bc072599313ef423d69156d824c075572a.tar.gz cgit-6d7552bc072599313ef423d69156d824c075572a.tar.bz2 |
Use GIT-1.7.2.2
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | ui-plain.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -25,25 +25,25 @@ static void print_object(const unsigned char *sha1, const char *path) html_status(404, "Not found", 0); return; } buf = read_sha1_file(sha1, &type, &size); if (!buf) { html_status(404, "Not found", 0); return; } ctx.page.mimetype = NULL; ext = strrchr(path, '.'); if (ext && *(++ext)) { - mime = string_list_lookup(ext, &ctx.cfg.mimetypes); + mime = string_list_lookup(&ctx.cfg.mimetypes, ext); if (mime) ctx.page.mimetype = (char *)mime->util; } if (!ctx.page.mimetype) { if (buffer_is_binary(buf, size)) ctx.page.mimetype = "application/octet-stream"; else ctx.page.mimetype = "text/plain"; } ctx.page.filename = fmt("%s", path); ctx.page.size = size; ctx.page.etag = sha1_to_hex(sha1); |