Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1077

Regression: URIs with trailing slash no longer match anything

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.0.10.Final
    • 3.0.8.Final
    • jaxrs
    • None
    • Hide

      1. Create a project using resteasy-netty or resteasy-netty4 3.0.8.Final
      2. paste the code from https://gist.github.com/tbroyer/789307a92c77ffff73d5
      3. run the test and see it fail
      4. downgrade Resteasy to 3.0.6.Final, re-run the test and see it pass
      5. upgrade back to 3.0.8.Final, remove the trailing slash in generateURL("/test/"), re-run the test and see it pass.

      Show
      1. Create a project using resteasy-netty or resteasy-netty4 3.0.8.Final 2. paste the code from https://gist.github.com/tbroyer/789307a92c77ffff73d5 3. run the test and see it fail 4. downgrade Resteasy to 3.0.6.Final, re-run the test and see it pass 5. upgrade back to 3.0.8.Final, remove the trailing slash in generateURL("/test/") , re-run the test and see it pass.

    Description

      Test case: https://gist.github.com/tbroyer/789307a92c77ffff73d5
      The test uses resteasy-netty or resteasy-netty4, but the bug is in resteasy-jaxrs, not in the provider.

      The test passes with Resteasy 3.0.6.Final but fails with 3.0.8.Final with:

      javax.ws.rs.NotFoundException: Could not find resource for full path: http://localhost:8081/test/
      	at org.jboss.resteasy.core.registry.SegmentNode.match(SegmentNode.java:112) ~[resteasy-jaxrs-3.0.8.Final.jar:?]
      	at org.jboss.resteasy.core.registry.RootNode.match(RootNode.java:43) ~[resteasy-jaxrs-3.0.8.Final.jar:?]
      	at org.jboss.resteasy.core.registry.RootClassNode.match(RootClassNode.java:48) ~[resteasy-jaxrs-3.0.8.Final.jar:?]
      	at org.jboss.resteasy.core.ResourceMethodRegistry.getResourceInvoker(ResourceMethodRegistry.java:444) ~[resteasy-jaxrs-3.0.8.Final.jar:?]
      	at org.jboss.resteasy.core.SynchronousDispatcher.getInvoker(SynchronousDispatcher.java:234) [resteasy-jaxrs-3.0.8.Final.jar:?]
      	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:171) [resteasy-jaxrs-3.0.8.Final.jar:?]
      	at org.jboss.resteasy.plugins.server.netty.RequestDispatcher.service(RequestDispatcher.java:83) [resteasy-netty-3.0.8.Final.jar:?]
      	at org.jboss.resteasy.plugins.server.netty.RequestHandler.messageReceived(RequestHandler.java:56) [resteasy-netty-3.0.8.Final.jar:?]
      	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) [netty-3.9.2.Final.jar:?]
      	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty-3.9.2.Final.jar:?]
      	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) [netty-3.9.2.Final.jar:?]
      	at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43) [netty-3.9.2.Final.jar:?]
      	at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67) [netty-3.9.2.Final.jar:?]
      	at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314) [netty-3.9.2.Final.jar:?]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_55]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_55]
      	at java.lang.Thread.run(Thread.java:744) [?:1.7.0_55]
      

      If you remove the trailing slash in generateURL("/test/"), the test passes.

      Attachments

        Activity

          People

            patriot1burke@gmail.com Bill Burke (Inactive)
            t.broyer Thomas Broyer (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: