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

Method dump_state_hdr

src/proxy/http/HttpSM.cc:7838–7854  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7836}
7837
7838void
7839HttpSM::dump_state_hdr(HTTPHdr *h, const char *s)
7840{
7841 // Dump the client request if available
7842 if (h->valid()) {
7843 int l = h->length_get();
7844 char *hdr_buf = static_cast<char *>(ats_malloc(l + 1));
7845 int index = 0;
7846 int offset = 0;
7847
7848 h->print(hdr_buf, l, &index, &offset);
7849
7850 hdr_buf[l] = '\0';
7851 Error(" ---- %s [%" PRId64 "] ----\n%s\n", s, sm_id, hdr_buf);
7852 ats_free(hdr_buf);
7853 }
7854}
7855
7856/*****************************************************************************
7857 *****************************************************************************

Callers

nothing calls this directly

Calls 6

ats_mallocFunction · 0.85
ats_freeFunction · 0.85
ErrorClass · 0.50
validMethod · 0.45
length_getMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected