From mboxrd@z Thu Jan 1 00:00:00 1970 From: dilyan.palauzov at aegee.org (=?UTF-8?Q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD_?= =?UTF-8?Q?=D0=9F=D0=B0=D0=BB=D0=B0=D1=83=D0=B7=D0=BE=D0=B2?=) Date: Tue, 29 Jan 2019 09:21:01 +0000 Subject: Slash after /about Message-ID: Hello, For CGI I use thttpd and it tends to remove terminating slashes in the requests. cgit wants to have slash after about/ . So they do not work together, endless loop happens. Proposed fix: diff --git a/cmd.c b/cmd.c --- a/cmd.c +++ b/cmd.c @@ -40,16 +40,7 @@ static void atom_fn(void) static void about_fn(void) { if (ctx.repo) { - size_t path_info_len = ctx.env.path_info ? strlen(ctx.env.path_info) : 0; - if (!ctx.qry.path && - ctx.qry.url[strlen(ctx.qry.url) - 1] != '/' && - (!path_info_len || ctx.env.path_info[path_info_len - 1] != '/')) { - char *currenturl = cgit_currenturl(); - char *redirect = fmtalloc("%s/", currenturl); - cgit_redirect(redirect, true); - free(currenturl); - free(redirect); - } else if (ctx.repo->readme.nr) + if (ctx.repo->readme.nr) cgit_print_repo_readme(ctx.qry.path); else if (ctx.repo->homepage) cgit_redirect(ctx.repo->homepage, false); Apart of this the alphabetical sort order of the options in cgitrc.5 is violated by case-sensitive-sort, it shall not be between cache-size and cache-scanrc-ttl . Regards ?????