| | |
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import com.google.inject.Inject;
|
| | | import com.google.inject.Singleton;
|
| | | import javax.servlet.http.HttpServlet;
|
| | |
|
| | | import org.eclipse.jgit.lib.ObjectId;
|
| | |
| | | import com.gitblit.utils.JGitUtils;
|
| | | import com.gitblit.utils.StringUtils;
|
| | | import com.gitblit.utils.SyndicationUtils;
|
| | | import com.google.inject.Inject;
|
| | | import com.google.inject.Singleton;
|
| | |
|
| | | /**
|
| | | * SyndicationServlet generates RSS 2.0 feeds and feed links.
|
| | |
| | |
|
| | | String servletUrl = request.getContextPath() + request.getServletPath();
|
| | | String url = request.getRequestURI().substring(servletUrl.length());
|
| | | if (url.charAt(0) == '/' && url.length() > 1) {
|
| | | if (url.length() > 1 && url.charAt(0) == '/') {
|
| | | url = url.substring(1);
|
| | | }
|
| | | String repositoryName = url;
|
| | |
| | | response.setContentType("application/rss+xml; charset=UTF-8");
|
| | |
|
| | | boolean isProjectFeed = false;
|
| | | String feedName = null;
|
| | | String feedName = "Gitblit";
|
| | | String feedTitle = null;
|
| | | String feedDescription = null;
|
| | |
|
| | |
| | | RepositoryModel model = repositoryManager.getRepositoryModel(name);
|
| | |
|
| | | if (repository == null) {
|
| | | if (model.isCollectingGarbage) {
|
| | | if (model != null && model.isCollectingGarbage) {
|
| | | logger.warn(MessageFormat.format("Temporarily excluding {0} from feed, busy collecting garbage", name));
|
| | | }
|
| | | continue;
|
| | |
| | | if (mountParameters) {
|
| | | // mounted url
|
| | | feedLink = MessageFormat.format("{0}/summary/{1}", gitblitUrl,
|
| | | StringUtils.encodeURL(feedName));
|
| | | StringUtils.encodeURL(feedName.replace('/', fsc)));
|
| | | } else {
|
| | | // parameterized url
|
| | | feedLink = MessageFormat.format("{0}/summary/?r={1}", gitblitUrl,
|