Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-16983

ForwardedHeaderFilter does not respect Servlet forwarding

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 5.0.7
    • Fix Version/s: 5.1.2
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      ForwardedHeaderFilter captures the requestUri on initial request (e.g. /foo).  That request URI can be altered due to a server-side forward - for example:

      request.getRequestDispatcher("/bar").forward(request, response)
      

      When the request is re-dispatched, code calling HttpServletRequest.getRequestURI() receives the old value (e.g. /foo) instead of the new value (e.g. /bar). Even if the filter is registered with DispatcherType.FORWARD, the issue remains that the filter implements OncePerRequestFilter.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rstoya05-aop Rossen Stoyanchev
              Reporter:
              sirianni Eric Sirianni
              Last updater:
              Spring Issuemaster
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 37 weeks, 2 days ago