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

Method populate_server_protocol

src/proxy/http/HttpSM.cc:8734–8751  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

8732
8733// Fill in the server protocols used. Return the number of entries populated.
8734int
8735HttpSM::populate_server_protocol(std::string_view *result, int n) const
8736{
8737 int retval = 0;
8738 if (!t_state.hdr_info.server_request.valid()) {
8739 return retval;
8740 }
8741 if (n > 0) {
8742 std::string_view proto = HttpSM::find_proto_string(t_state.hdr_info.server_request.version_get());
8743 if (!proto.empty()) {
8744 result[retval++] = proto;
8745 if (n > retval && server_txn) {
8746 retval += server_txn->populate_protocol(result + retval, n - retval);
8747 }
8748 }
8749 }
8750 return retval;
8751}
8752
8753// Look for a specific server protocol
8754const char *

Callers 1

Calls 4

version_getMethod · 0.80
validMethod · 0.45
emptyMethod · 0.45
populate_protocolMethod · 0.45

Tested by

no test coverage detected