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

Function TSHttpTxnCntlGet

src/api/InkAPI.cc:5224–5265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5222}
5223
5224bool
5225TSHttpTxnCntlGet(TSHttpTxn txnp, TSHttpCntlType ctrl)
5226{
5227 sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
5228
5229 HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
5230
5231 switch (ctrl) {
5232 case TS_HTTP_CNTL_LOGGING_MODE:
5233 return sm->t_state.api_info.logging_enabled;
5234 break;
5235
5236 case TS_HTTP_CNTL_INTERCEPT_RETRY_MODE:
5237 return sm->t_state.api_info.retry_intercept_failures;
5238 break;
5239
5240 case TS_HTTP_CNTL_RESPONSE_CACHEABLE:
5241 return sm->t_state.api_resp_cacheable;
5242 break;
5243
5244 case TS_HTTP_CNTL_REQUEST_CACHEABLE:
5245 return sm->t_state.api_req_cacheable;
5246 break;
5247
5248 case TS_HTTP_CNTL_SERVER_NO_STORE:
5249 return sm->t_state.api_server_response_no_store;
5250 break;
5251
5252 case TS_HTTP_CNTL_TXN_DEBUG:
5253 return sm->debug_on;
5254 break;
5255
5256 case TS_HTTP_CNTL_SKIP_REMAPPING:
5257 return sm->t_state.api_skip_all_remapping;
5258 break;
5259
5260 default:
5261 break;
5262 }
5263
5264 return false; // Unknown here, but oh well.
5265}
5266
5267/* This is kinda horky, we have to use TSServerState instead of
5268 HttpTransact::ServerState_t, otherwise we have a prototype

Callers 4

_getMethod · 0.85
append_valueMethod · 0.85
evalMethod · 0.85
ts_lua_http_cntl_getFunction · 0.85

Calls 1

sdk_sanity_check_txnFunction · 0.85

Tested by

no test coverage detected