Skip to content

Update parsed path handling in UrlHandlerFilter #35538

Closed

Description

@rstoyanchev

While investigating a UrlHandlerFilter with FORWARD scenario under #35509, I experimented with async/error dispatches, and spotted more issues.

The path is parsed and cached, or accessed if previously parsed, in order to inspect, but it remains as the cached path, but it has the trailing slash. This is mitigated by the DispatcherServlet parsing it on its own, but affects async dispatches that see it as previously parsed. For this, we should only parse, if necessary (but not cache), and then ensure the path without the trailing slash is cached at the point of wrapping and delegating to the rest of the filter chain.

There is no need to filter ERROR dispatches which is a different path (like FORWARD).

There is no need to filter the ASYNC dispatch either because that's done with the wrapped request, which reflects the modified URL without a trailing slash.

Activity

  1. added this to the 6.2.12 milestone on Sep 24, 2025
  2. self-assigned this
    on Sep 24, 2025
  3. added
    in: webIssues in web modules (web, webmvc, webflux, websocket)
    on Sep 24, 2025
  4. added a commit that references this issue on Sep 25, 2025
    5a85891
  5. github-actions commented on Sep 25, 2025

    @github-actions
    Contributor

    Fixed via 5a85891

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions