summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--Makefile4
-rw-r--r--cgit.c5
-rw-r--r--html.c2
-rw-r--r--ui-shared.c2
4 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index a988751..14b4df4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,2 @@
-CGIT_VERSION = v0.8.3.4
+CGIT_VERSION = v0.8.3.5
CGIT_SCRIPT_NAME = cgit.cgi
@@ -243,2 +243,2 @@ clean-doc:
get-git:
- curl $(GIT_URL) | tar -xj && rm -rf git && mv git-$(GIT_VER) git
+ curl $(GIT_URL) | tar -xjf - && rm -rf git && mv git-$(GIT_VER) git
diff --git a/cgit.c b/cgit.c
index 916feb4..f4dd6ef 100644
--- a/cgit.c
+++ b/cgit.c
@@ -754,6 +754,7 @@ int main(int argc, const char **argv)
/* 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, '/');
diff --git a/html.c b/html.c
index a1fe87d..a60bc13 100644
--- a/html.c
+++ b/html.c
@@ -279,3 +279,3 @@ char *convert_query_hexchar(char *txt)
if (d1<0 || d2<0) {
- memmove(txt, txt+3, n-3);
+ memmove(txt, txt+3, n-2);
return txt-1;
diff --git a/ui-shared.c b/ui-shared.c
index 7efae7a..5aa9119 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -576,3 +576,3 @@ void cgit_print_http_headers(struct cgit_context *ctx)
if (ctx->page.size)
- htmlf("Content-Length: %ld\n", ctx->page.size);
+ htmlf("Content-Length: %zd\n", ctx->page.size);
if (ctx->page.filename)