소스 검색

Fix raw servlet trashing paths with spaces

tags/v1.6.2
James Moger 9 년 전
부모
커밋
9ceddb6615
2개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 2
    0
      releases.moxie
  2. 2
    3
      src/main/java/com/gitblit/servlet/RawServlet.java

+ 2
- 0
releases.moxie 파일 보기

@@ -11,11 +11,13 @@ r26: {
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
}

#

+ 2
- 3
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) {

Loading…
취소
저장