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

Method client_protocol_contains

src/proxy/http/HttpSM.cc:8717–8731  ·  view source on GitHub ↗

Look for a specific client protocol

Source from the content-addressed store, hash-verified

8715
8716// Look for a specific client protocol
8717const char *
8718HttpSM::client_protocol_contains(std::string_view tag_prefix) const
8719{
8720 const char *retval = nullptr;
8721 std::string_view proto = HttpSM::find_proto_string(t_state.hdr_info.client_request.version_get());
8722 if (!proto.empty()) {
8723 std::string_view prefix(tag_prefix);
8724 if (prefix.size() <= proto.size() && 0 == strncmp(proto.data(), prefix.data(), prefix.size())) {
8725 retval = proto.data();
8726 } else if (_ua.get_txn()) {
8727 retval = _ua.get_txn()->protocol_contains(prefix);
8728 }
8729 }
8730 return retval;
8731}
8732
8733// Fill in the server protocols used. Return the number of entries populated.
8734int

Callers 1

Calls 6

version_getMethod · 0.80
get_txnMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
protocol_containsMethod · 0.45

Tested by

no test coverage detected