bneradt commented on code in PR #12576:
URL: https://github.com/apache/trafficserver/pull/12576#discussion_r2488102406
##########
plugins/prefetch/pattern.cc:
##########
@@ -204,22 +177,13 @@ Pattern::process(const String &subject, StringVector
&result)
bool
Pattern::match(const String &subject)
{
- int matchCount;
PrefetchDebug("matching '%s' to '%s'", _pattern.c_str(), subject.c_str());
- if (!_re) {
- return false;
- }
-
- matchCount = pcre_exec(_re, _extra, subject.c_str(), subject.length(), 0,
PCRE_NOTEMPTY, nullptr, 0);
- if (matchCount < 0) {
- if (matchCount != PCRE_ERROR_NOMATCH) {
- PrefetchError("matching error %d", matchCount);
- }
+ if (_regex.empty()) {
return false;
}
- return true;
Review Comment:
There's a few of these PrefetchError's that are lost in the shuffle. I think
we should be able to preserve these using a different Regex interface.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]