https://bz.apache.org/bugzilla/show_bug.cgi?id=69633

            Bug ID: 69633
           Summary: Filters mapped to "" are not applied to empty string
                    ("") special URL pattern
           Product: Tomcat 11
           Version: 11.0.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Util
          Assignee: dev@tomcat.apache.org
          Reporter: gr.grzy...@gmail.com
  Target Milestone: -------

I try to make Pax Web 10 based on Tomcat 11 (and Jetty 12 and Undertow 2.3)
compliant with OSGi CMPN TCK.

One of the failing tests is about applying filters mapped to "" when requesting
"root context" URI (like http://localhost:8080/).

https://jakarta.ee/specifications/servlet/6.1/jakarta-servlet-spec-6.1#specification-of-mappings
mentions this "special" pattern:

> The empty string ("") is a special URL
> pattern that exactly maps to the application’s
> context root, i.e., requests of the form
> http://host:port/<context-root> or
> http://host:port/<context-root>/. 
> In this case the path info is "/" and the servlet
> path is empty string ("").

Nowhere in the Servlet API specification is stated that this mapping doesn't
related to Filter mappings too.

However in Tomcat
`org.apache.catalina.util.FilterUtil#matchFiltersURL(java.lang.String,
java.lang.String)`

we have:

// Case 4 - "Default" Match
return false; // NOTE - Not relevant for selecting filters

for testPath="" and requestPath="/"

I think this special condition should be added...

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to