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

Method isNonstandardMethodAllowed

include/proxy/IPAllow.h:367–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365}
366
367inline bool
368IpAllow::ACL::isNonstandardMethodAllowed(std::string_view method) const
369{
370 if (_r == nullptr) {
371 return false;
372 } else if (_r->_method_mask == ALL_METHOD_MASK) {
373 return true;
374 }
375 bool method_in_set =
376 std::find_if(_r->_nonstandard_methods.begin(), _r->_nonstandard_methods.end(),
377 [method](std::string_view const &s) { return 0 == strcasecmp(s, method); }) != _r->_nonstandard_methods.end();
378 return _r->_deny_nonstandard_methods ? !method_in_set : method_in_set;
379}
380
381inline void
382IpAllow::ACL::clear()

Callers 2

Calls 3

strcasecmpFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected