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

Method write_proxy_request_node

plugins/traffic_dump/transaction_data.cc:363–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361}
362
363void
364TransactionData::write_proxy_request_node(TSMBuffer &buffer, TSMLoc &hdr_loc)
365{
366 std::ostringstream proxy_request_node;
367 proxy_request_node << R"(,"proxy-request":{)";
368 // For CONNECT requests, the _server_protocol_description will be empty
369 // because it gets populated on receipt of an HTTP response. For tunnels, we
370 // establish a connection to the origin for the tunnel but don't send an HTTP
371 // request nor does the server send a response. Therefore the protocol is
372 // never populated and will be empty here.
373 if (!_server_protocol_description.empty()) {
374 proxy_request_node << _server_protocol_description + ",";
375 }
376 proxy_request_node << write_message_node(buffer, hdr_loc, TSHttpTxnServerReqBodyBytesGet(_txnp));
377 _txn_json += proxy_request_node.str();
378}
379
380void
381TransactionData::write_server_response_node(TSMBuffer &buffer, TSMLoc &hdr_loc)

Callers 1

Calls 3

emptyMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected