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

ContainerRequestContext setRequestUri doesn't affect @Context-injected UriInfo

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.0.8.Final
    • Fix Version/s: 3.0.9.Final
    • Component/s: jaxrs
    • Labels:
      None
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Add the following just after your call to setRequestUri:

      ResteasyProviderFactory.pushContext(UriInfo.class, requestContext.getUriInfo());
      
      Show
      Add the following just after your call to setRequestUri : ResteasyProviderFactory.pushContext(UriInfo.class, requestContext.getUriInfo());

      Description

      Changes to the request URI made by setRequestUri in a pre-matching filter aren't reflected in the UriInfo object injected into resources.

      Technically, the UriInfo instance in the context-data map is not replaced, and setRequestUri doesn't update the object in place (see RESTEASY-1097) but creates a new object.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bill.burke Bill Burke
                Reporter:
                t.broyer Thomas Broyer
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: