MCPcopy Create free account
hub / github.com/apache/trafficserver / matchesRegex

Method matchesRegex

plugins/slice/Config.cc:326–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326bool
327Config::matchesRegex(char const *const url, int const urllen) const
328{
329 bool matches = true;
330
331 switch (m_regex_type) {
332 case Exclude: {
333 if (0 <= pcre_exec(m_regex, m_regex_extra, url, urllen, 0, 0, nullptr, 0)) {
334 matches = false;
335 }
336 } break;
337 case Include: {
338 if (pcre_exec(m_regex, m_regex_extra, url, urllen, 0, 0, nullptr, 0) < 0) {
339 matches = false;
340 }
341 } break;
342 default:
343 break;
344 }
345
346 return matches;
347}
348
349void
350Config::setCacheSize(size_t entries)

Callers 1

read_requestFunction · 0.80

Calls 1

pcre_execFunction · 0.85

Tested by

no test coverage detected