about summary refs log tree commit diff stats
path: root/cgit.c
diff options
context:
space:
mode:
authorLars Hjemli2011-03-05 14:01:59 +0100
committerLars Hjemli2011-03-05 14:01:59 +0100
commit1b09cbd303d889ec2636127584d57b7f1b70c25e (patch)
tree2b1188f946451d06af4d9120cbc3ba34de716f21 /cgit.c
parentMerge branch 'br/misc' (diff)
parentCGIT 0.8.3.5 (diff)
downloadcgit-1b09cbd303d889ec2636127584d57b7f1b70c25e.tar.gz
cgit-1b09cbd303d889ec2636127584d57b7f1b70c25e.zip
Merge branch 'stable'
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c5
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)
752 http_parse_querystring(ctx.qry.raw, querystring_cb); 752 http_parse_querystring(ctx.qry.raw, querystring_cb);
753 753
754 /* If virtual-root isn't specified in cgitrc, lets pretend 754 /* If virtual-root isn't specified in cgitrc, lets pretend
755 * that virtual-root equals SCRIPT_NAME. 755 * that virtual-root equals SCRIPT_NAME, minus any possibly
756 * trailing slashes.
756 */ 757 */
757 if (!ctx.cfg.virtual_root) 758 if (!ctx.cfg.virtual_root)
758 ctx.cfg.virtual_root = ctx.cfg.script_name; 759 ctx.cfg.virtual_root = trim_end(ctx.cfg.script_name, '/');
759 760
760 /* If no url parameter is specified on the querystring, lets 761 /* If no url parameter is specified on the querystring, lets
761 * use PATH_INFO as url. This allows cgit to work with virtual 762 * use PATH_INFO as url. This allows cgit to work with virtual