diff options
-rw-r--r-- | src/main/java/com/gitblit/servlet/RawServlet.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/com/gitblit/servlet/RawServlet.java b/src/main/java/com/gitblit/servlet/RawServlet.java index 6e933076..a9e58202 100644 --- a/src/main/java/com/gitblit/servlet/RawServlet.java +++ b/src/main/java/com/gitblit/servlet/RawServlet.java @@ -106,10 +106,6 @@ public class RawServlet extends DaggerServlet { String encodedPath = path == null ? "" : path.replace(' ', '-'); encodedPath = encodedPath.replace('/', fsc); - try { - encodedPath = URLEncoder.encode(encodedPath, "UTF-8"); - } catch (UnsupportedEncodingException e) { - } return baseURL + Constants.RAW_PATH + repository + "/" + (branch == null ? "" : (branch + "/" + (path == null ? "" : encodedPath))); } @@ -134,7 +130,8 @@ public class RawServlet extends DaggerServlet { if (path.endsWith("/")) { path = path.substring(0, path.length() - 1); } - return path; + char c = runtimeManager.getSettings().getChar(Keys.web.forwardSlashCharacter, '/'); + return path.replace('!', '/').replace(c, '/'); } protected boolean renderIndex() { |