Actually my commit here probably broke the current behavior but I think it is related to trailing slashes.

On Fri, Sep 26, 2014 at 10:19 AM, Bill O'Neil <> wrote:
Hi Miere,

I think this is related to the issue you reported back in June that we talked about.  At the following line trailing /'s are being stripped from PathTemplates.  This causes it to compare /sameurl to /sameurl/ which does not match.

Here is the ticket showing when the behavior changed and that it should be fixed.

If you remove the trailing slash from the first two urls it will work, however that is not really a fix.  

On Fri, Sep 26, 2014 at 9:13 AM, Miere Teixeira <> wrote:

On Thu, Sep 25, 2014 at 7:39 AM, Miere Teixeira <> wrote:
Hi Devs,

I'm facing a new situation with RoutingHandler. I have two HttpHandler's, one responsible to retrieve all users registered in my database. The second one is responsible to include an user into my database.

Both handler was registered with RoutingHandler, both registered with '/users/' URL but the first one registered for GET and the second for POST.

After upgrade to 1.1.0.Beta7 version, this behavior was broken and throws the exception described bellow.

I've made this simple unit test that simulates the same error when running in 1.1.0.Beta7, but works perfectly in 1.1.0.Beta6.

Let me know if it is a bug or the wrong way to achieve this goal. Also, let me know if I could in some way.


java.lang.IllegalStateException: UT000071: Cannot add path template /sameurl, matcher already contains an equivalent pattern /sameurl
    at io.undertow.util.PathTemplateMatcher.add(
    at io.undertow.util.PathTemplateMatcher.add(
    at io.undertow.server.RoutingHandler.add(
    at io.undertow.server.RoutingHandler.add(
    at kikaha.core.RoutingHandlerTest.ensureItsPossibleToHandlePostAndGetToSameURL(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(
    at org.junit.runners.ParentRunner.runLeaf(
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(
    at org.junit.runners.ParentRunner$
    at org.junit.runners.ParentRunner$1.schedule(
    at org.junit.runners.ParentRunner.runChildren(
    at org.junit.runners.ParentRunner.access$000(
    at org.junit.runners.ParentRunner$2.evaluate(
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(

undertow-dev mailing list