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

Method setErrorBody

src/tscpp/api/Transaction.cc:181–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181void
182Transaction::setErrorBody(const std::string &page)
183{
184 LOG_DEBUG("Transaction tshttptxn=%p setting error body page length: %lu", state_->txn_, page.length());
185 char *body = static_cast<char *>(TSmalloc(page.length()));
186 memcpy(body, page.data(), page.length());
187 TSHttpTxnErrorBodySet(state_->txn_, body, page.length(), nullptr); // Default to text/html
188}
189
190void
191Transaction::setErrorBody(const std::string &page, const std::string &mimetype)

Callers

nothing calls this directly

Calls 7

TSmallocFunction · 0.85
TSHttpTxnErrorBodySetFunction · 0.85
TSstrdupFunction · 0.85
memcpyFunction · 0.50
lengthMethod · 0.45
dataMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected