-rw-r--r-- | cgit.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -70,5 +70,5 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value) if (*value == '/') - ctx.repo->readme = xstrdup(value); + repo->readme = xstrdup(value); else - ctx.repo->readme = xstrdup(fmt("%s/%s", ctx.repo->path, value)); + repo->readme = xstrdup(fmt("%s/%s", repo->path, value)); } else if (ctx.cfg.enable_filter_overrides) { @@ -167,2 +167,4 @@ void config_cb(const char *name, const char *value) ctx.cfg.max_repodesc_len = atoi(value); + else if (!strcmp(name, "max-blob-size")) + ctx.cfg.max_blob_size = atoi(value); else if (!strcmp(name, "max-repo-count")) @@ -213,2 +215,4 @@ static void querystring_cb(const char *name, const char *value) } else if (!strcmp(name, "url")) { + if (*value == '/') + value++; ctx.qry.url = xstrdup(value); @@ -274,2 +278,3 @@ static void prepare_context(struct cgit_context *ctx) ctx->cfg.max_repodesc_len = 80; + ctx->cfg.max_blob_size = 0; ctx->cfg.max_stats = 0; |