James Moger
2014-10-26 9ceddb66153d78fbbc13fc6b1ab24714080ed17a
Fix raw servlet trashing paths with spaces
2 files modified
7 ■■■■■ changed files
releases.moxie 2 ●●●●● patch | view | raw | blame | history
src/main/java/com/gitblit/servlet/RawServlet.java 5 ●●●●● patch | view | raw | blame | history
releases.moxie
@@ -11,11 +11,13 @@
    security: ~
    fixes:
    - Fix French translation (pr-224, ticket-210)
    - Fix raw servlet trashing paths with spaces (ticket-211)
    changes: ~
    additions: ~
    dependencyChanges: ~
    contributors:
    - Pierre Templier
    - Barry Roberts
}
#
src/main/java/com/gitblit/servlet/RawServlet.java
@@ -104,9 +104,8 @@
            branch = Repository.shortenRefName(branch).replace('/', fsc);
        }
        String encodedPath = path == null ? "" : path.replace(' ', '-');
        encodedPath = encodedPath.replace('/', fsc);
        return baseURL + Constants.RAW_PATH + repository + "/" + (branch == null ? "" : (branch + "/" + (path == null ? "" : encodedPath)));
        String encodedPath = path == null ? "" : path.replace('/', fsc);
        return baseURL + Constants.RAW_PATH + repository + "/" + (branch == null ? "" : (branch + "/" + encodedPath));
    }
    protected String getBranch(String repository, HttpServletRequest request) {