| 346 | } |
| 347 | |
| 348 | bool |
| 349 | setupServerIntercept(TSHttpTxn txnp) |
| 350 | { |
| 351 | TSCont contp = TSContCreate(serverIntercept, TSMutexCreate()); |
| 352 | if (!contp) { |
| 353 | TSError("[server_intercept][%s] Could not create intercept request", __FUNCTION__); |
| 354 | return false; |
| 355 | } |
| 356 | SContData *cont_data = new SContData(contp); |
| 357 | TSContDataSet(contp, cont_data); |
| 358 | TSHttpTxnServerIntercept(contp, txnp); |
| 359 | TSHttpTxnCntlSet(txnp, TS_HTTP_CNTL_RESPONSE_CACHEABLE, true); |
| 360 | TSHttpTxnCntlSet(txnp, TS_HTTP_CNTL_REQUEST_CACHEABLE, true); |
| 361 | Dbg(dbg_ctl, "[%s] Setup server intercept successfully", __FUNCTION__); |
| 362 | return true; |
| 363 | } |
no test coverage detected