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

InternalDispatcher forwards requests with wrong UriInfo on EAP

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.0.15.Final
    • 3.0.14.Final
    • jaxrs
    • None

      Description of problem:
      InternalDispatcher forwards requests with wrong UriInfo on EAP.

      Reproducer is attached. Reproducer is based on InternalDispatcherTest from upstream TS.

      How reproducible:
      Always

      Steps to Reproduce: (use attached reproducer)

      1. mvn test -Djboss.home=${EAP_HOME}

      Actual results:
      org.junit.ComparisonFailure: Wrong first URI in stack
      expected: http://localhost:8080/InternalDispatcherTest/basic but was: http://localhost:8080/basic

      Additional info:
      If you use forwarding on http://localhost:8080/InternalDispatcherTest/forward/basic:

          @GET
          @Produces("text/plain")
          @Path("/forward/basic")
          public String forwardBasic(@Context InternalDispatcher dispatcher) {
              return (String) dispatcher.getEntity("/basic");
          }
      

      to "/basic":

          @GET
          @Produces("text/plain")
          @Path("/basic")
          public String getBasic() {
              return basic;
          }
      

      then @Context UriInfo uriInfo; in "/basic" contains http://localhost:8080/basic. But http://localhost:8080/basic returns 404. Correct URI is http://localhost:8080/InternalDispatcherTest/basic

            mstefank Martin Stefanko
            mkopecky@redhat.com Marek Kopecky
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: