diff options
author | James Moger <james.moger@gitblit.com> | 2014-10-26 08:30:03 -0600 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-10-26 08:30:03 -0600 |
commit | be5d1452fa95788fcca760b338416a5d29923a32 (patch) | |
tree | 6e19957a91d2388273acc097ac167579776eacbb /src | |
parent | 94199c8c4d30bd3392d870048e704814d7efd706 (diff) | |
parent | 9ceddb66153d78fbbc13fc6b1ab24714080ed17a (diff) | |
download | gitblit-be5d1452fa95788fcca760b338416a5d29923a32.tar.gz gitblit-be5d1452fa95788fcca760b338416a5d29923a32.zip |
Merged #211 "Fix raw servlet trashing paths with spaces"
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/servlet/RawServlet.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/com/gitblit/servlet/RawServlet.java b/src/main/java/com/gitblit/servlet/RawServlet.java index ac77646f..ca41d0ab 100644 --- a/src/main/java/com/gitblit/servlet/RawServlet.java +++ b/src/main/java/com/gitblit/servlet/RawServlet.java @@ -104,9 +104,8 @@ public class RawServlet extends DaggerServlet { 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) { |