Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-2476

InternalDispatcher forwards requests with wrong UriInfo on EAP

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.0.0.ER6
    • 7.0.0.ER3
    • REST
    • 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:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: