View | Details | Raw Unified | Return to bug 41521
Collapse All | Expand All

(-)java/org/apache/catalina/core/ApplicationFilterFactory.java (-1 / +5 lines)
Lines 234-240 Link Here
234
234
235
        // Check the specific "*" special URL pattern, which also matches
235
        // Check the specific "*" special URL pattern, which also matches
236
        // named dispatches
236
        // named dispatches
237
        if (filterMap.getAllMatch())
237
        if (filterMap.getMatchAllUrlPatterns())
238
            return (true);
238
            return (true);
239
        
239
        
240
        if (requestPath == null)
240
        if (requestPath == null)
Lines 319-324 Link Here
319
319
320
        if (servletName == null) {
320
        if (servletName == null) {
321
            return (false);
321
            return (false);
322
        }
323
        // Check the specific "*" special servlet name
324
        else if (filterMap.getMatchAllServletNames()) {
325
            return (true);
322
        } else {
326
        } else {
323
            String[] servletNames = filterMap.getServletNames();
327
            String[] servletNames = filterMap.getServletNames();
324
            for (int i = 0; i < servletNames.length; i++) {
328
            for (int i = 0; i < servletNames.length; i++) {
(-)java/org/apache/catalina/deploy/FilterMap.java (-5 / +18 lines)
Lines 87-92 Link Here
87
    }
87
    }
88
88
89
    public void addServletName(String servletName) {
89
    public void addServletName(String servletName) {
90
        if ("*".equals(servletName)) {
91
            this.matchAllServletNames = true;
92
        }
90
        String[] results = new String[servletNames.length + 1];
93
        String[] results = new String[servletNames.length + 1];
91
        System.arraycopy(servletNames, 0, results, 0, servletNames.length);
94
        System.arraycopy(servletNames, 0, results, 0, servletNames.length);
92
        results[servletNames.length] = servletName;
95
        results[servletNames.length] = servletName;
Lines 95-110 Link Here
95
98
96
    
99
    
97
    /**
100
    /**
98
     * The flag that indicates this mapping will match all.
101
     * The flag that indicates this mapping will match all url-patterns
99
     */
102
     */
100
    private boolean allMatch = false;
103
    private boolean matchAllUrlPatterns = false;
101
    
104
    
102
    public boolean getAllMatch() {
105
    public boolean getMatchAllUrlPatterns() {
103
        return allMatch;
106
        return matchAllUrlPatterns;
104
    }
107
    }
105
    
108
    
106
109
107
    /**
110
    /**
111
     * The flag that indicates this mapping will match all servlet-names
112
     */
113
    private boolean matchAllServletNames = false;
114
    
115
    public boolean getMatchAllServletNames() {
116
        return matchAllServletNames;
117
    }
118
119
    
120
    /**
108
     * The URL pattern this mapping matches.
121
     * The URL pattern this mapping matches.
109
     */
122
     */
110
    private String[] urlPatterns = new String[0];
123
    private String[] urlPatterns = new String[0];
Lines 115-121 Link Here
115
128
116
    public void addURLPattern(String urlPattern) {
129
    public void addURLPattern(String urlPattern) {
117
        if ("*".equals(urlPattern)) {
130
        if ("*".equals(urlPattern)) {
118
            this.allMatch = true;
131
            this.matchAllUrlPatterns = true;
119
        } else {
132
        } else {
120
            String[] results = new String[urlPatterns.length + 1];
133
            String[] results = new String[urlPatterns.length + 1];
121
            System.arraycopy(urlPatterns, 0, results, 0, urlPatterns.length);
134
            System.arraycopy(urlPatterns, 0, results, 0, urlPatterns.length);

Return to bug 41521