about summary refs log tree commit diff
path: root/cgit.c
diff options
context:
space:
mode:
authorStefan Bühler <source@stbuehler.de>2009-09-14 21:37:13 +0000
committerLars Hjemli <hjemli@gmail.com>2009-10-06 18:56:43 +0200
commit121898e73d6e28656c2d451effc6d9907ebdc5ba (patch)
treed83e9d57cfc5b20d55b10502b832d077ae3ee076 /cgit.c
parentFix repolist search links with virtual root (diff)
downloadcgit-pink-121898e73d6e28656c2d451effc6d9907ebdc5ba.tar.gz
cgit-pink-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>
Diffstat (limited to '')
-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)
 	} 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")) {
d>Build with debug infoJune McEnroe 2017-07-31Don't dump tiles in coreJune McEnroe 2017-07-31Use designated initializers for messagesJune McEnroe 2017-07-31Show other clients' cursorsJune McEnroe 2017-07-31Perform enter as two moves rather than a loopJune McEnroe 2017-07-31Track tile access countsJune McEnroe 2017-07-31Adjust move speed in clientJune McEnroe 2017-07-31Handle large movesJune McEnroe 2017-07-30Optimize builds for chrootJune McEnroe 2017-07-30Persist bright across color changesJune McEnroe 2017-07-30Add index.htmlJune McEnroe 2017-07-30Add snapshot.shJune McEnroe 2017-07-30Fix termcap patch for background colorsJune McEnroe 2017-07-30Update helpJune McEnroe 2017-07-30Fix help to track colorJune McEnroe 2017-07-30Support background colorsJune McEnroe 2017-07-30Track color only client-sideJune McEnroe 2017-07-30Add ostensible support for background colorsJune McEnroe 2017-07-30Add tile create and access timestampsJune McEnroe 2017-07-30Assert stable struct Tile field offsetsJune McEnroe 2017-07-30Add chroot.shJune McEnroe 2017-07-30Add ` commandJune McEnroe 2017-07-30Add sshd_configJune McEnroe 2017-07-30Add termcap patchJune McEnroe