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>
Esse commit está contido em:
Stefan Bühler 2009-09-14 21:37:13 +00:00 commit de Lars Hjemli
commit 121898e73d

2
cgit.c
Ver arquivo

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