Replace filterPath pattern '/*' with empty string#230
Replace filterPath pattern '/*' with empty string#230fschrogl wants to merge 1 commit intoapache:masterfrom fschrogl:patch-1
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.