]> source.dussan.org Git - gitblit.git/commitdiff
Bug in the rawservlet in extracting the repository out of the path. The 222/head 03/203/1
authorRobbert Noordzij <robbert@xseeding.nl>
Tue, 7 Oct 2014 10:14:27 +0000 (12:14 +0200)
committerRobbert Noordzij <robbert@xseeding.nl>
Tue, 7 Oct 2014 10:14:27 +0000 (12:14 +0200)
offset for finding the next slash should be the current slash + 1, not
the last offset + the offset of the current slash.

src/main/java/com/gitblit/servlet/RawServlet.java

index 9fb96a5dac93abab85eef54bb1f46156416ad43c..ac77646fcc31ede9bc921d1c7ad5f16eba104b97 100644 (file)
@@ -172,7 +172,7 @@ public class RawServlet extends DaggerServlet {
                        } else {
                                repository = path.substring(0, slash);
                        }
-                       offset += ( slash + 1 );
+                       offset = ( slash + 1 );
                        r = repositoryManager.getRepository(repository, false);
                        if (repository.equals(path)) {
                                // either only repository in url or no repository found