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

Function TSHttpTxnErrorBodySet

src/api/InkAPI.cc:4839–4856  ·  view source on GitHub ↗

Set the body, or, if you provide a null buffer, clear the body message

Source from the content-addressed store, hash-verified

4837
4838// Set the body, or, if you provide a null buffer, clear the body message
4839void
4840TSHttpTxnErrorBodySet(TSHttpTxn txnp, char *buf, size_t buflength, char *mimetype)
4841{
4842 sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
4843
4844 HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
4845 HttpTransact::State *s = &(sm->t_state);
4846
4847 // Cleanup anything already set.
4848 s->free_internal_msg_buffer();
4849 ats_free(s->internal_msg_buffer_type);
4850
4851 s->internal_msg_buffer = buf;
4852 s->internal_msg_buffer_size = buf ? buflength : 0;
4853 s->internal_msg_buffer_fast_allocator_size = -1;
4854
4855 s->internal_msg_buffer_type = mimetype;
4856}
4857
4858char *
4859TSHttpTxnErrorBodyGet(TSHttpTxn txnp, size_t *buflength, char **mimetype)

Callers 15

handle_responseFunction · 0.85
TSRemapDoRemapFunction · 0.85
handle_responseFunction · 0.85
handle_responseFunction · 0.85
Headers.ccFile · 0.85
ssn_handlerFunction · 0.85
setErrorBodyMethod · 0.85
local_handlerFunction · 0.85
_global_cont_funcMethod · 0.85
on_send_response_headerFunction · 0.85
handleFetchEventsFunction · 0.85
EditRedirectResponseFunction · 0.85

Calls 3

sdk_sanity_check_txnFunction · 0.85
ats_freeFunction · 0.85

Tested by 1

ssn_handlerFunction · 0.68