summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-07-05 13:06:24 -0400
committerJames Moger <james.moger@gitblit.com>2014-07-05 13:06:24 -0400
commit58562a1348536c460547329c6b1aa2c1ebc4665f (patch)
tree0f3f6eda7fb502c74be3fc300b6d52b8b1c6de13 /src
parent9b575e8fac8d5e17e77cc284092abd856ddec8ac (diff)
downloadgitblit-58562a1348536c460547329c6b1aa2c1ebc4665f.tar.gz
gitblit-58562a1348536c460547329c6b1aa2c1ebc4665f.zip
Fix raw servlet blob paths not respecting web.forwardSlashCharacter
Diffstat (limited to 'src')
-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 15e036ea..f57ae2c4 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) {