diff options
author | James Moger <james.moger@gitblit.com> | 2014-07-05 13:25:26 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-07-05 13:25:26 -0400 |
commit | 3e0c6ca8a65bd4b076cac1451c9cdfde4be1d4b8 (patch) | |
tree | 380dbea35f8dec7cdb3abf53acc8055e92797222 /src/main/java/com/gitblit/servlet/RawServlet.java | |
parent | dc9af4ce8b21d1f586a3f3dcdc3d6ededdee738c (diff) | |
parent | f010ef67e4fece736f005050ef63ad5a62c68c8b (diff) | |
download | gitblit-3e0c6ca8a65bd4b076cac1451c9cdfde4be1d4b8.tar.gz gitblit-3e0c6ca8a65bd4b076cac1451c9cdfde4be1d4b8.zip |
Merge branch 'ticket/139'
Conflicts:
src/main/java/com/gitblit/servlet/RawServlet.java
Diffstat (limited to 'src/main/java/com/gitblit/servlet/RawServlet.java')
-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() { |