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:
parent
9735835c0e
commit
121898e73d
2
cgit.c
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")) {
|
||||
|
Caricamento…
Fai riferimento in un nuovo problema
Block a user