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

Method populate_client_protocol

src/proxy/http/HttpSM.cc:8700–8714  ·  view source on GitHub ↗

Fill in the client protocols used. Return the number of entries populated.

Source from the content-addressed store, hash-verified

8698
8699// Fill in the client protocols used. Return the number of entries populated.
8700int
8701HttpSM::populate_client_protocol(std::string_view *result, int n) const
8702{
8703 int retval = 0;
8704 if (n > 0) {
8705 std::string_view proto = HttpSM::find_proto_string(t_state.hdr_info.client_request.version_get());
8706 if (!proto.empty()) {
8707 result[retval++] = proto;
8708 if (n > retval && _ua.get_txn()) {
8709 retval += _ua.get_txn()->populate_protocol(result + retval, n - retval);
8710 }
8711 }
8712 }
8713 return retval;
8714}
8715
8716// Look for a specific client protocol
8717const char *

Calls 4

version_getMethod · 0.80
get_txnMethod · 0.80
emptyMethod · 0.45
populate_protocolMethod · 0.45

Tested by

no test coverage detected