* @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). */
| 724 | * @note Add the class to hier-part (RFC 3986). |
| 725 | */ |
| 726 | bool |
| 727 | CacheKey::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. |
no test coverage detected