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

Function print_request_headers

plugins/xdebug/xdebug_headers.cc:168–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168void
169print_request_headers(TSHttpTxn txn, std::stringstream &output)
170{
171 TSMBuffer buf_c, buf_s;
172 TSMLoc hdr_loc;
173 if (TSHttpTxnClientReqGet(txn, &buf_c, &hdr_loc) == TS_SUCCESS) {
174 output << "{'type':'request', 'side':'client', 'headers': {\n";
175 print_headers(buf_c, hdr_loc, output);
176 output << "\n\t}}";
177 TSHandleMLocRelease(buf_c, TS_NULL_MLOC, hdr_loc);
178 }
179 if (TSHttpTxnServerReqGet(txn, &buf_s, &hdr_loc) == TS_SUCCESS) {
180 output << ",{'type':'request', 'side':'server', 'headers': {\n";
181 print_headers(buf_s, hdr_loc, output);
182 output << "\n\t}}";
183 TSHandleMLocRelease(buf_s, TS_NULL_MLOC, hdr_loc);
184 }
185}
186
187void
188print_response_headers(TSHttpTxn txn, std::stringstream &output)

Callers 1

getPreBodyFunction · 0.85

Calls 4

TSHttpTxnClientReqGetFunction · 0.85
print_headersFunction · 0.85
TSHandleMLocReleaseFunction · 0.85
TSHttpTxnServerReqGetFunction · 0.85

Tested by

no test coverage detected