0
0
mirror of https://git.zx2c4.com/cgit synced 2025-03-30 12:07:03 +00:00

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>
This commit is contained in:
Stefan Bühler 2009-09-14 21:37:13 +00:00 committed by Lars Hjemli
parent 9735835c0e
commit 121898e73d

2
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")) {