http://sparkjava.com/documentation#redirects, method doesn't seem to work when I try to add the trailing slash. And it does not match trailing slashes with a mapped route. So it considers /api/test and /api/test/ as different URIs. This commit solve thoese problem with little change in code. The changed file: src/main/java/spark/http/matching/MatcherFilter.java line 107, add
108 if (uri.length() > 1 && uri.endsWith("/"))
109 uri = uri.substring(0, uri.length() - 1);
http://sparkjava.com/documentation#redirects, method doesn't seem to work when I try to add the trailing slash. And it does not match trailing slashes with a mapped route. So it considers /api/test and /api/test/ as different URIs. This commit solve thoese problem with little change in code. The changed file: src/main/java/spark/http/matching/MatcherFilter.java line 107, add