Repository navigation
Conversation
A custom PatternMatcher set on PathMatchingFilterChainResolver was not used by the filters in the chain, which matched the path again with their own AntPathMatcher. Non-Ant patterns did not work as a result. The resolver now records the matched pattern as a request attribute and PathMatchingFilter uses that pattern's config directly. Applies to the Guice SimpleFilterChainResolver as well, which now looks up the chain by its configured pattern after a trailing-slash match.
lprimak
requested review from
bdemers,
bmarwell,
boris-petrov,
fpapon and
steinarb
November 24, 2026 01:03
Contributor
Author
|
@4n86rakam1 can you please review? |
|
@lprimak |
fpapon
approved these changes
Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2969. Supersedes #2970.
A custom
PatternMatcherset onPathMatchingFilterChainResolverwas only used by the resolver. The filters in the chain matched the path again with their ownAntPathMatcher, so non-Ant patterns (for example regular expressions) did not work.The resolver now stores the pattern it matched as a request attribute, and
PathMatchingFilteruses that pattern's config directly instead of matching again. This works regardless of when filters are added or which matcher they have.Also:
SimpleFilterChainResolverdoes the same, and now looks up the chain by its configured pattern after a trailing-slash match.PathMatchingFilter.preHandle.Behavior note: a filter that overrides
pathsMatchis no longer consulted for requests whose chain was selected by the resolver.Following this checklist to help us incorporate your contribution quickly and easily:
Make sure there is a GitHub issue filed
for the change (usually before you start working on it). Trivial changes like typos do not
require a GitHub issue. Your pull request should address just this issue, without pulling in other changes.
Format the pull request title like
[#XXX] - Fixes bug in SessionManager,where you replace
#XXXwith the appropriate GitHub issue. Best practiceis to use the GitHub issue title in the pull request title and in the first line of the commit message.
Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
add
fixes #XXXif merging the PR should close a related issue.Run
mvn verifyto make sure basic checks pass. A more thorough check will be performed on your pull request automatically.Committers: Make sure a milestone is set on the PR
Committers: Use "Squash and Merge" to combine all commits into one when merging a PR when appropriate.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004