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

Method appendUaClass

plugins/cachekey/cachekey.cc:726–739  ·  view source on GitHub ↗

* @brief Append the class name based on the User-Agent classification using the provided classifier. * @param classifier User-Agent header classifier which will return a single class name to be added to the key. * @return true if classification successful, false if no match was found. * @note Add the class to hier-part (RFC 3986). */

Source from the content-addressed store, hash-verified

724 * @note Add the class to hier-part (RFC 3986).
725 */
726bool
727CacheKey::appendUaClass(Classifier &classifier)
728{
729 String classname;
730 bool matched = ::classifyUserAgent(classifier, _buf, _hdrs, classname);
731
732 if (matched) {
733 append(classname);
734 } else {
735 /* @todo: TBD do we need a default class name to be added to the key? */
736 }
737
738 return matched;
739}
740
741/**
742 * @brief Update cache key.

Callers 1

setCacheKeyFunction · 0.80

Calls 2

classifyUserAgentFunction · 0.85
appendFunction · 0.70

Tested by

no test coverage detected