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

Function getKeyQuery

plugins/cachekey/cachekey.cc:104–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102
103template <typename T>
104static String
105getKeyQuery(const char *query, int length, const ConfigQuery &config)
106{
107 std::istringstream istr(String(query, length));
108 String token;
109 T container;
110
111 while (std::getline(istr, token, '&')) {
112 String::size_type pos(token.find_first_of('='));
113 String param(token.substr(0, pos == String::npos ? token.size() : pos));
114
115 if (config.toBeAdded(param)) {
116 ::appendToContainer(container, token);
117 }
118 }
119
120 return containerToString<T, typename T::const_iterator>(container, "?", "&");
121}
122
123static void
124ltrim(String &target)

Callers

nothing calls this directly

Calls 5

appendToContainerFunction · 0.85
toBeAddedMethod · 0.80
StringClass · 0.50
substrMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected