CCM NG: Removed duplicate slash from URL used by ContentSectionServlet (#2751)

git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@5185 8810af33-2d31-482b-a856-94f89814c4df

Former-commit-id: 97b4642cf8
pull/2/head
jensp 2018-01-10 10:44:52 +00:00
parent a37bcdc942
commit 792f09656a
1 changed files with 2 additions and 2 deletions

View File

@ -444,13 +444,13 @@ public class ContentSectionServlet extends BaseApplicationServlet {
if (url.endsWith(XML_SUFFIX)) {
request.setAttribute(XML_MODE, Boolean.TRUE);
LOGGER.debug("StraightXML Requested");
itemUrl = "/" + url.substring(0, url.length() - XML_SUFFIX.length());
itemUrl = "/" + url.substring(1, url.length() - XML_SUFFIX.length());
} else {
request.setAttribute(XML_MODE, Boolean.FALSE);
if (url.endsWith(FILE_SUFFIX)) {
itemUrl = String.format(
"/%s",
url.substring(0, url.length() - FILE_SUFFIX.length()));
url.substring(1, url.length() - FILE_SUFFIX.length()));
} else if (url.endsWith("/")) {
itemUrl = String.format("/%s",
url.substring(0, url.length() - 1));