DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=41835>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41835 Summary: smart filtering not working for some match arguments Product: Apache httpd-2 Version: 2.2.4 Platform: Other OS/Version: All Status: NEW Severity: normal Priority: P2 Component: mod_filter AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] The provider for smart filtering is not being called when the match matches the value declared as dispatch for integer and unconditional arguments. ie, you have next directives in httpd.conf -> SetEnv foo 99 FilterProvider include INCLUDES env=foo <100 FilterChain include And the document including the shtml file won't display it. >From mod_filter.c in filter_lookup() some changes need to be done. See below an excerpt from the code that i modified if (!str) { // if (provider->match_type == DEFINED && provider->match.string) { /* THIS IS NOT ALWAYS TRUE SINCE match_type MAY BE A DIFFERENT TYPE */ match = 0; //} } //else if (!provider->match.string) { /* IS BETTER TO VERIFY NOT NULLS BELOW FOR provider->match.string AND provider->match.regex ONLY */ // match = 0; //} else { /* Now we have no nulls, so we can do string and regexp matching */ switch (provider->match_type) { case STRING_MATCH: if (strcasecmp(str, provider->match.string)) { match = 0; } break; case STRING_CONTAINS: str1 = apr_pstrdup(r->pool, str); ap_str_tolower(str1); if (!strstr(str1, provider->match.string)) { match = 0; } break; case REGEX_MATCH: if (ap_regexec(provider->match.regex, str, 0, NULL, 0) == AP_REG_NOMATCH) { match = 0; } break; case INT_EQ: if (atoi(str) != provider->match.number) { match = 0; } break; case INT_LT: if (atoi(str) >= provider->match.number) { /* IF YOU CONSIDER match IS SET TO 1 AND ONLY WILL BE SET TO ZERO FOR FAIL CASES THEN INCOMING */ /* INTEGER MUST BE GREATHER-THAN OR EQUAL TO SPECIFIED NUMBER. IT MAKES SENSE AS YOU SEE BELOW */ /* FOR INT_EQ WHERE THE CONDITION IS != AND NOT == AND THIS APPLIES TO ALL NUMERIC COMPARISON. */ match = 0; } break; case INT_LE: if (atoi(str) > provider->match.number) { /* REVERSE CONDITION */ match = 0; } break; case INT_GT: if (atoi(str) <= provider->match.number) { /* REVERSE CONDITION */ match = 0; } break; case INT_GE: if (atoi(str) < provider->match.number) { /* REVERSE CONDITION */ match = 0; } break; case DEFINED: /* we already handled this:-) */ break; } } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
