summaryrefslogtreecommitdiffstats
path: root/src/test/java/com/gitblit/servlet/RawServletTest.java
Commit message (Collapse)AuthorAgeFilesLines
* raw: Fix raw links to branches with a slash in their nameFlorian Zschocke2020-11-101-16/+16
| | | | | | | | | When a branch has a slash in the name, the raw servlet was not able to find the path under that branch. This is due to the replacement of the forward slash character for URLs. It was not taken into account when comparing the branch name later. This fixes #1290 and its duplicates #1234 and #813.
* raw: Refactor RawServlet:getBranch and :getPath parametersFlorian Zschocke2020-11-091-44/+685
| | | | | | | | | | | Refactor the `getBranch` and `getPath` methods to take a String as second parameter, which is the already sanitised path info. Don't get the path info from a passed in request anymore. The methods are only ever called from within `processRequest`, which already does some checks on the path info, like removing a leading slash character. So no need to do that every time again the methods and passing a request for that.
* raw: Fix exceptions when no path info is given to raw servletFlorian Zschocke2020-11-091-1/+111
|
* raw: Strip leading and trailing slash from repo and path names for linkFlorian Zschocke2020-11-091-0/+675
When creating a link for raw display, a trailing slash is stripped from the end of the base URL. Also do this for the repository, as well as stripping leading slashes from the repository and the path values.