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

Method invoke

plugins/experimental/txn_box/plugin/src/Machinery.cc:90–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88Do_ua_req_url_host::Do_ua_req_url_host(Expr &&expr) : _expr(std::move(expr)) {}
89
90Errata
91Do_ua_req_url_host::invoke(Context &ctx)
92{
93 if (auto hdr{ctx.ua_req_hdr()}; hdr.is_valid()) {
94 if (auto url{hdr.url()}; url.is_valid()) {
95 auto value = ctx.extract(_expr);
96 if (auto host = std::get_if<IndexFor(STRING)>(&value); nullptr != host) {
97 url.host_set(*host);
98 }
99 }
100 }
101 return {};
102}
103
104swoc::Rv<Directive::Handle>
105Do_ua_req_url_host::load(Config &cfg, CfgStaticData const *, YAML::Node drtv_node, swoc::TextView const &, swoc::TextView const &,

Callers

nothing calls this directly

Calls 15

URL_Loc_SetFunction · 0.85
Req_Loc_SetFunction · 0.85
ErrataClass · 0.85
TSVConnClosedGetFunction · 0.85
TSContDataGetFunction · 0.85
TSContDataSetFunction · 0.85
TSContDestroyFunction · 0.85
TSVConnWriteVIOGetFunction · 0.85
TSContCallFunction · 0.85
TSVIOContGetFunction · 0.85
TSVConnShutdownFunction · 0.85

Tested by

no test coverage detected