diff options
author | Lars Hjemli <hjemli@gmail.com> | 2011-03-05 14:01:59 +0100 |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2011-03-05 14:01:59 +0100 |
commit | 1b09cbd303d889ec2636127584d57b7f1b70c25e (patch) | |
tree | 2b1188f946451d06af4d9120cbc3ba34de716f21 /cgit.c | |
parent | Merge branch 'br/misc' (diff) | |
parent | CGIT 0.8.3.5 (diff) | |
download | cgit-pink-1b09cbd303d889ec2636127584d57b7f1b70c25e.tar.gz cgit-pink-1b09cbd303d889ec2636127584d57b7f1b70c25e.zip |
Merge branch 'stable'
Diffstat (limited to '')
-rw-r--r-- | cgit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cgit.c b/cgit.c index 916feb4..f4dd6ef 100644 --- a/cgit.c +++ b/cgit.c @@ -752,10 +752,11 @@ int main(int argc, const char **argv) http_parse_querystring(ctx.qry.raw, querystring_cb); /* If virtual-root isn't specified in cgitrc, lets pretend - * that virtual-root equals SCRIPT_NAME. + * that virtual-root equals SCRIPT_NAME, minus any possibly + * trailing slashes. */ if (!ctx.cfg.virtual_root) - ctx.cfg.virtual_root = ctx.cfg.script_name; + ctx.cfg.virtual_root = trim_end(ctx.cfg.script_name, '/'); /* If no url parameter is specified on the querystring, lets * use PATH_INFO as url. This allows cgit to work with virtual |