-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace filterPath pattern '/*' with empty string #230
base: master
Are you sure you want to change the base?
Conversation
A filterPath pattern of '/*' is now replaced with an empty string. This matches the behavior of methods getFilterPathFromAnnotation() and getFilterPathFromConfig().
bq. wicketFilter.setFilterPath("/") the path gets internally rewritten to "/" Is something missing here ? The values are the same - |
I tried to initialize Wicket using WicketFilter class and three different approaches (one after another). That's where I noticed the different behavior (at least that's how I understand it). (1) Using setFilterPath method
(2) Using init params
(3) Using
In approach (1) I have to use |
Just my thoughts: /* - maps every path - root paths and sub paths to the specific filter So from my understanding they aren't the same and shouldn't be mixed up. https://stackoverflow.com/questions/4140448/difference-between-and-in-servlet-mapping-url-pattern Maybe we should inspect this a bit more to achieve the right handling. WDTY? |
@martin-g what do you thing of extracting the lines: to into a method and call this method within getFilterPath and getFilterPathFromConfig? |
This PR seems to be inactive for too long :( |
A filterPath pattern of '/*' is now replaced with an empty string. This matches the behavior of methods getFilterPathFromAnnotation() and getFilterPathFromConfig().
I'm not sure if it's a bug, but I noticed the different beahvior when initializing Wicket in a Spring Boot application. When using a @webfilter("/") annotation or the init parameter filterMappingUrlPattern="/" Wicket works as expected, but when doing the same programmatically with wicketFilter.setFilterPath("/") the path gets internally rewritten to "/" and Wicket than only handles HTTP requests to the root path.