about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStefan Bühler2009-09-14 21:37:13 +0000
committerLars Hjemli2009-10-06 18:56:43 +0200
commit121898e73d6e28656c2d451effc6d9907ebdc5ba (patch)
treed83e9d57cfc5b20d55b10502b832d077ae3ee076
parentFix repolist search links with virtual root (diff)
downloadcgit-121898e73d6e28656c2d451effc6d9907ebdc5ba.tar.gz
cgit-121898e73d6e28656c2d451effc6d9907ebdc5ba.zip
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>
-rw-r--r--cgit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c index bd37788..a17f40d 100644 --- a/cgit.c +++ b/cgit.c
@@ -209,6 +209,8 @@ static void querystring_cb(const char *name, const char *value)
209 } else if (!strcmp(name, "p")) { 209 } else if (!strcmp(name, "p")) {
210 ctx.qry.page = xstrdup(value); 210 ctx.qry.page = xstrdup(value);
211 } else if (!strcmp(name, "url")) { 211 } else if (!strcmp(name, "url")) {
212 if (*value == '/')
213 value++;
212 ctx.qry.url = xstrdup(value); 214 ctx.qry.url = xstrdup(value);
213 cgit_parse_url(value); 215 cgit_parse_url(value);
214 } else if (!strcmp(name, "qt")) { 216 } else if (!strcmp(name, "qt")) {