trafficserver
trafficserver copied to clipboard
Possibly forgotten parameter of `Matcher::test_reg` in `plugins/header_rewrite /matcher.h`
Hi there,
There is this function and it has the following signature:
bool
test_reg(const std::string &t, bool nocase = false) const
However, it seems to me that the nocase parameter is forgotten and should be removed. Here are my thoughts/reasons for this:
- The
Matcherclass already takesnocaseflag upon construction and stores it in a member variable. This same member variable is used in this function and in other functions of the class - This
test_regfunction is private and it's part of overload set oftest_regfunctions which are called by the publictestfunction of theMatcher. Therenocaseargument is not passed. - The
nocaseargument is not used inside thistest_regfunction. It uses the_nocasemember for debug printing, though.
So, should the nocase argument of this function be removed? Or should it be used in this function instead of _nocase member?