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

Method server_protocol_contains

src/proxy/http/HttpSM.cc:8754–8770  ·  view source on GitHub ↗

Look for a specific server protocol

Source from the content-addressed store, hash-verified

8752
8753// Look for a specific server protocol
8754const char *
8755HttpSM::server_protocol_contains(std::string_view tag_prefix) const
8756{
8757 const char *retval = nullptr;
8758 std::string_view proto = HttpSM::find_proto_string(t_state.hdr_info.server_request.version_get());
8759 if (!proto.empty()) {
8760 std::string_view prefix(tag_prefix);
8761 if (prefix.size() <= proto.size() && 0 == strncmp(proto.data(), prefix.data(), prefix.size())) {
8762 retval = proto.data();
8763 } else {
8764 if (server_txn) {
8765 retval = server_txn->protocol_contains(prefix);
8766 }
8767 }
8768 }
8769 return retval;
8770}
8771
8772std::string_view
8773HttpSM::find_proto_string(HTTPVersion version) const

Callers 1

Calls 5

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

Tested by

no test coverage detected