summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-07-05 11:10:40 -0600
committerJames Moger <james.moger@gitblit.com>2014-07-05 11:10:40 -0600
commitdc9af4ce8b21d1f586a3f3dcdc3d6ededdee738c (patch)
tree6ee22e3721f287344fdc9f105d6374f6fef42efc
parentaa4f732bc3e285dc1433af358c89ab54c90f0d50 (diff)
parent58562a1348536c460547329c6b1aa2c1ebc4665f (diff)
downloadgitblit-dc9af4ce8b21d1f586a3f3dcdc3d6ededdee738c.tar.gz
gitblit-dc9af4ce8b21d1f586a3f3dcdc3d6ededdee738c.zip
Merged #139 "Raw link blob paths do not respect web.forwardSlashCharacter"
-rw-r--r--src/main/java/com/gitblit/servlet/RawServlet.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/com/gitblit/servlet/RawServlet.java b/src/main/java/com/gitblit/servlet/RawServlet.java
index 0cda59ab..6e933076 100644
--- a/src/main/java/com/gitblit/servlet/RawServlet.java
+++ b/src/main/java/com/gitblit/servlet/RawServlet.java
@@ -95,16 +95,17 @@ public class RawServlet extends DaggerServlet {
baseURL = baseURL.substring(0, baseURL.length() - 1);
}
+ char fsc = '!';
+ char c = GitblitContext.getManager(IRuntimeManager.class).getSettings().getChar(Keys.web.forwardSlashCharacter, '/');
+ if (c != '/') {
+ fsc = c;
+ }
if (branch != null) {
- char fsc = '!';
- char c = GitblitContext.getManager(IRuntimeManager.class).getSettings().getChar(Keys.web.forwardSlashCharacter, '/');
- if (c != '/') {
- fsc = c;
- }
branch = branch.replace('/', fsc);
}
String encodedPath = path == null ? "" : path.replace(' ', '-');
+ encodedPath = encodedPath.replace('/', fsc);
try {
encodedPath = URLEncoder.encode(encodedPath, "UTF-8");
} catch (UnsupportedEncodingException e) {