added test that checks PR#1960
@@ -194,6 +194,17 @@ public class RouterTest extends WebTestBase {
testRequest(HttpMethod.GET, "/foo//", 200, "OK");
}
+ @Test
+ public void testSlashPathsWithParams() throws Exception {
+ router.route("/foo/:id").handler(rc -> {
+ rc.response().end();
+ });
+ testRequest(HttpMethod.GET, "/foo/123", 200, "OK");
+ testRequest(HttpMethod.GET, "/foo/123/", 200, "OK");
+ testRequest(HttpMethod.GET, "/foo//123/", 200, "OK");
+ testRequest(HttpMethod.GET, "/foo//123//", 200, "OK");
+ }
+
@Test
public void testRoutePathAndMethod() throws Exception {
for (HttpMethod meth : METHODS) {
