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

Function print_response_headers

plugins/xdebug/xdebug_headers.cc:187–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187void
188print_response_headers(TSHttpTxn txn, std::stringstream &output)
189{
190 TSMBuffer buf_c, buf_s;
191 TSMLoc hdr_loc;
192 if (TSHttpTxnServerRespGet(txn, &buf_s, &hdr_loc) == TS_SUCCESS) {
193 output << "{'type':'response', 'side':'server', 'headers': {\n";
194 print_headers(buf_s, hdr_loc, output);
195 output << "\n\t}},";
196 TSHandleMLocRelease(buf_s, TS_NULL_MLOC, hdr_loc);
197 }
198 if (TSHttpTxnClientRespGet(txn, &buf_c, &hdr_loc) == TS_SUCCESS) {
199 output << "{'type':'response', 'side':'client', 'headers': {\n";
200 print_headers(buf_c, hdr_loc, output);
201 output << "\n\t}}";
202 TSHandleMLocRelease(buf_c, TS_NULL_MLOC, hdr_loc);
203 }
204}

Callers 1

getPostBodyFunction · 0.85

Calls 4

TSHttpTxnServerRespGetFunction · 0.85
print_headersFunction · 0.85
TSHandleMLocReleaseFunction · 0.85
TSHttpTxnClientRespGetFunction · 0.85

Tested by

no test coverage detected