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

Function TSHttpTxnAborted

src/api/InkAPI.cc:4494–4519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4492}
4493
4494TSReturnCode
4495TSHttpTxnAborted(TSHttpTxn txnp, bool *client_abort)
4496{
4497 sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
4498 sdk_assert(client_abort != nullptr);
4499
4500 *client_abort = false;
4501 HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
4502 switch (sm->t_state.squid_codes.log_code) {
4503 case SQUID_LOG_ERR_CLIENT_ABORT:
4504 case SQUID_LOG_ERR_CLIENT_READ_ERROR:
4505 case SQUID_LOG_TCP_SWAPFAIL:
4506 // check for client abort and cache read error
4507 *client_abort = true;
4508 return TS_SUCCESS;
4509 default:
4510 break;
4511 }
4512
4513 if (sm->t_state.current.server && sm->t_state.current.server->abort == HttpTransact::ABORTED) {
4514 // check for the server abort
4515 return TS_SUCCESS;
4516 }
4517 // there can be the case of transformation error.
4518 return TS_ERROR;
4519}
4520
4521void
4522TSHttpTxnReqCacheableSet(TSHttpTxn txnp, int flag)

Callers 3

cacheNodeListFunction · 0.85
ts_lua_http_is_abortedFunction · 0.85
AbortedMethod · 0.85

Calls 1

sdk_sanity_check_txnFunction · 0.85

Tested by

no test coverage detected