James Moger
2014-05-29 2c50880dbd5de292e37d2533fccfcb62f6be9f95
src/main/java/com/gitblit/servlet/RawServlet.java
@@ -94,7 +94,17 @@
      if (baseURL.length() > 0 && baseURL.charAt(baseURL.length() - 1) == '/') {
         baseURL = baseURL.substring(0, baseURL.length() - 1);
      }
      String encodedPath = path.replace(' ', '-');
      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(' ', '-');
      try {
         encodedPath = URLEncoder.encode(encodedPath, "UTF-8");
      } catch (UnsupportedEncodingException e) {
@@ -109,7 +119,8 @@
      if (fs > -1) {
         branch = branch.substring(0, fs);
      }
      return branch;
      char c = runtimeManager.getSettings().getChar(Keys.web.forwardSlashCharacter, '/');
      return branch.replace('!', '/').replace(c, '/');
   }
   protected String getPath(String repository, String branch, HttpServletRequest request) {