From c2272275ca990f3e12a5c1fa0a5de4c670a4d8b4 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Sat, 11 Jun 2011 16:23:49 -0400
Subject: [PATCH] RSS syndication feature. Documentation. CSS tweaks.

---
 src/com/gitblit/DownloadZipServlet.java |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/com/gitblit/DownloadZipServlet.java b/src/com/gitblit/DownloadZipServlet.java
index 86ca4e7..1745474 100644
--- a/src/com/gitblit/DownloadZipServlet.java
+++ b/src/com/gitblit/DownloadZipServlet.java
@@ -41,7 +41,10 @@
 	}
 
 	public static String asLink(String baseURL, String repository, String objectId, String path) {
-		return baseURL + (baseURL.endsWith("/") ? "" : "/") + "zip?r=" + repository
+		if (baseURL.charAt(baseURL.length() - 1) == '/') {
+			baseURL = baseURL.substring(0, baseURL.length() - 1);
+		}
+		return baseURL + Constants.ZIP_SERVLET_PATH + "?r=" + repository
 				+ (path == null ? "" : ("&p=" + path))
 				+ (objectId == null ? "" : ("&h=" + objectId));
 	}

--
Gitblit v1.9.1