From 134a895dbf6db6b9784f165a3a577d6059949169 Mon Sep 17 00:00:00 2001
From: Mohamed MOUNIROU <mmounirou@MacBook-Pro-de-Mohamed.local>
Date: Tue, 04 Oct 2011 16:35:09 -0400
Subject: [PATCH] add tools to install giblet as service on linux based os
---
src/com/gitblit/SyndicationServlet.java | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/com/gitblit/SyndicationServlet.java b/src/com/gitblit/SyndicationServlet.java
index 9949754..4ba2789 100644
--- a/src/com/gitblit/SyndicationServlet.java
+++ b/src/com/gitblit/SyndicationServlet.java
@@ -116,8 +116,8 @@
javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException,
java.io.IOException {
- String hostURL = HttpUtils.getHostURL(request);
- String url = request.getRequestURI().substring(request.getServletPath().length());
+ String servletUrl = request.getContextPath() + request.getServletPath();
+ String url = request.getRequestURI().substring(servletUrl.length());
if (url.charAt(0) == '/' && url.length() > 1) {
url = url.substring(1);
}
@@ -139,7 +139,7 @@
RepositoryModel model = GitBlit.self().getRepositoryModel(repositoryName);
List<RevCommit> commits = JGitUtils.getRevLog(repository, objectId, 0, length);
try {
- SyndicationUtils.toRSS(hostURL, getTitle(model.name, objectId), model.description,
+ SyndicationUtils.toRSS(HttpUtils.getGitblitURL(request), getTitle(model.name, objectId), model.description,
model.name, commits, response.getOutputStream());
} catch (Exception e) {
logger.error("An error occurred during feed generation", e);
--
Gitblit v1.9.1