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

Function s_dump_header

include/proxy/http/HttpTransact.h:59–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57#define HTTP_RELEASE_ASSERT(X) ink_release_assert(X)
58
59inline void
60s_dump_header(HTTPHdr const *hdr, std::string &out)
61{
62 int offset{0};
63 int done{0};
64 do {
65 int used{0};
66 char b[4096];
67 // The buffer offset is taken non-const and it is apparently
68 // modified in some code path, but in my testing it does
69 // not change, it seems. Since we manually bump the offset,
70 // the use of tmp is precautionary to make sure our logic
71 // doesn't break in case it does change in some circumstance.
72 int tmp{offset};
73 done = hdr->print(b, 4096, &used, &tmp);
74 offset += used;
75 out.append(b, used);
76 } while (0 == done);
77}
78
79inline void
80dump_header(DbgCtl const &ctl, HTTPHdr const *hdr, std::int64_t sm_id, std::string_view description)

Callers 1

dump_headerFunction · 0.85

Calls 2

printMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected