| 4492 | } |
| 4493 | |
| 4494 | TSReturnCode |
| 4495 | TSHttpTxnAborted(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 | |
| 4521 | void |
| 4522 | TSHttpTxnReqCacheableSet(TSHttpTxn txnp, int flag) |
no test coverage detected