]> source.dussan.org Git - gitblit.git/commit
raw: Refactor RawServlet:getBranch and :getPath parameters
authorFlorian Zschocke <f.zschocke+git@gmail.com>
Sun, 8 Nov 2020 16:19:35 +0000 (17:19 +0100)
committerFlorian Zschocke <f.zschocke+git@gmail.com>
Mon, 9 Nov 2020 22:19:53 +0000 (23:19 +0100)
commit26db31876aaf59651bb8b8a0b65bb4865f090788
treef988b04b13485a5691a492da9d5c4d0337a2bf41
parent23943971846437c8bc24504d3bd4b681edea5433
raw: Refactor RawServlet:getBranch and :getPath parameters

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.
src/main/java/com/gitblit/servlet/PagesServlet.java
src/main/java/com/gitblit/servlet/RawServlet.java
src/test/java/com/gitblit/servlet/RawServletTest.java