From b4fbe4fd4430d644d60e8ffcb90370c75a84e540 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Mon, 24 Nov 2014 09:34:27 -0500
Subject: [PATCH] Ensure that pretty-printed files are served as text/plain in Raw servlet
---
src/main/java/com/gitblit/utils/SyndicationUtils.java | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/gitblit/utils/SyndicationUtils.java b/src/main/java/com/gitblit/utils/SyndicationUtils.java
index 93e9321..7afd038 100644
--- a/src/main/java/com/gitblit/utils/SyndicationUtils.java
+++ b/src/main/java/com/gitblit/utils/SyndicationUtils.java
@@ -71,7 +71,11 @@
feed.setEncoding("UTF-8");
feed.setTitle(title);
feed.setLink(feedLink);
- feed.setDescription(description);
+ if (StringUtils.isEmpty(description)) {
+ feed.setDescription(title);
+ } else {
+ feed.setDescription(description);
+ }
SyndImageImpl image = new SyndImageImpl();
image.setTitle(Constants.NAME);
image.setUrl(hostUrl + "/gitblt_25.png");
--
Gitblit v1.9.1