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

ContainerRequestContext setRequestUri doesn't affect @Context-injected UriInfo

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.0.9.Final
    • 3.0.8.Final
    • jaxrs
    • None
    • Workaround Exists
    • 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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: