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

Method extract

plugins/experimental/txn_box/plugin/src/query.cc:177–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177Feature
178QueryValueExtractor::extract(Context &ctx, const Spec &spec)
179{
180 auto qs = this->query_string(ctx);
181 if (qs.empty()) {
182 return NIL_FEATURE;
183 }
184 auto &&[name, value] = ts::query_value_for(qs, spec._data.text, true); // case insensitive
185 if (value.size() == 0) {
186 if (value.data() == nullptr || value.data() == name.end()) {
187 return NIL_FEATURE; // key not present or value not present
188 }
189 return FeatureView::Literal("");
190 }
191 return FeatureView::Direct(value);
192}
193
194// --
195

Callers 15

operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45
parse_unquoted_exprMethod · 0.45
query.ccFile · 0.45
eval_pairMethod · 0.45
invokeMethod · 0.45
invoke_on_urlMethod · 0.45

Calls 14

query_value_forFunction · 0.85
DirectClass · 0.85
query_stringMethod · 0.80
pristine_url_getMethod · 0.80
proxy_req_hdrMethod · 0.80
storage_forMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
endMethod · 0.45
ua_req_hdrMethod · 0.45
is_validMethod · 0.45

Tested by

no test coverage detected