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

Method setup_error_transfer

src/proxy/http/HttpSM.cc:6945–6963  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////////// HttpSM::setup_error_transfer() The proxy has generated an error message which it is sending to the client. For some cases, however, such as when the proxy is transparent, returning a proxy-generated error message exposes the proxy, destroying transparency. The HttpBodyFactory code, therefore, does not generate an error message

Source from the content-addressed store, hash-verified

6943//
6944//////////////////////////////////////////////////////////////////////////
6945void
6946HttpSM::setup_error_transfer()
6947{
6948 if (body_factory->is_response_suppressed(&t_state) || t_state.internal_msg_buffer ||
6949 is_response_body_precluded(t_state.http_return_code)) {
6950 // Since we need to send the error message, call the API
6951 // function
6952 ink_assert(t_state.internal_msg_buffer_size > 0 || is_response_body_precluded(t_state.http_return_code));
6953 t_state.api_next_action = HttpTransact::SM_ACTION_API_SEND_RESPONSE_HDR;
6954 do_api_callout();
6955 } else {
6956 SMDbg(dbg_ctl_http, "Now closing connection ...");
6957 vc_table.cleanup_entry(_ua.get_entry());
6958 _ua.set_entry(nullptr);
6959 // _ua.get_txn() = NULL;
6960 terminate_sm = true;
6961 t_state.source = HttpTransact::SOURCE_INTERNAL;
6962 }
6963}
6964
6965void
6966HttpSM::setup_internal_transfer(HttpSMHandler handler_arg)

Callers

nothing calls this directly

Calls 5

cleanup_entryMethod · 0.80
get_entryMethod · 0.80
set_entryMethod · 0.80

Tested by

no test coverage detected