neocgit

a more 'modern' version of cgit
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/neocgit

commit 121898e73d6e28656c2d451effc6d9907ebdc5ba
parent 9735835c0e9f2c4a0caf5a431fc455d5855472aa
Author: Stefan Bühler <source@stbuehler.de>
Date:   Mon, 14 Sep 2009 21:37:13 +0000

Skip leading "/" in url querystring value

Makes it easier to rewrite :)
lighttpd-sandbox: rewrite "/cgit.cgi?url=%{enc:request.path}&%{request.query}";

Signed-off-by: Stefan Bühler <source@stbuehler.de>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>

Diffstat:
Mcgit.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/cgit.c b/cgit.c @@ -209,6 +209,8 @@ static void querystring_cb(const char *name, const char *value) } else if (!strcmp(name, "p")) { ctx.qry.page = xstrdup(value); } else if (!strcmp(name, "url")) { + if (*value == '/') + value++; ctx.qry.url = xstrdup(value); cgit_parse_url(value); } else if (!strcmp(name, "qt")) {