MCPcopy Create free account
hub / github.com/apache/trafficserver / operator()

Method operator()

plugins/traffic_dump/sensitive_fields.h:46–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44struct StringHashByLower {
45public:
46 size_t
47 operator()(std::string_view str) const
48 {
49 std::string lower;
50 lower.resize(str.size());
51 std::transform(str.begin(), str.end(), lower.begin(), [](unsigned char c) -> unsigned char { return std::tolower(c); });
52 return std::hash<std::string>()(lower);
53 }
54};
55
56/** The type used to store the set of user-sensitive HTTP fields, such as

Callers

nothing calls this directly

Calls 5

tolowerFunction · 0.85
resizeMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected