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
jensp 2018-01-10 10:44:52 +00:00
parent 6f6683c182
commit 97b4642cf8
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)) { if (url.endsWith(XML_SUFFIX)) {
request.setAttribute(XML_MODE, Boolean.TRUE); request.setAttribute(XML_MODE, Boolean.TRUE);
LOGGER.debug("StraightXML Requested"); LOGGER.debug("StraightXML Requested");
itemUrl = "/" + url.substring(0, url.length() - XML_SUFFIX.length()); itemUrl = "/" + url.substring(1, url.length() - XML_SUFFIX.length());
} else { } else {
request.setAttribute(XML_MODE, Boolean.FALSE); request.setAttribute(XML_MODE, Boolean.FALSE);
if (url.endsWith(FILE_SUFFIX)) { if (url.endsWith(FILE_SUFFIX)) {
itemUrl = String.format( itemUrl = String.format(
"/%s", "/%s",
url.substring(0, url.length() - FILE_SUFFIX.length())); url.substring(1, url.length() - FILE_SUFFIX.length()));
} else if (url.endsWith("/")) { } else if (url.endsWith("/")) {
itemUrl = String.format("/%s", itemUrl = String.format("/%s",
url.substring(0, url.length() - 1)); url.substring(0, url.length() - 1));