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

Function TSHttpTxnRedoCacheLookup

src/api/InkAPI.cc:8770–8788  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8768}
8769
8770TSReturnCode
8771TSHttpTxnRedoCacheLookup(TSHttpTxn txnp, const char *url, int length)
8772{
8773 sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
8774
8775 HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
8776 HttpTransact::State *s = &(sm->t_state);
8777 sdk_assert(s->next_action == HttpTransact::SM_ACTION_CACHE_LOOKUP);
8778
8779 // Because of where this is in the state machine, the storage for the cache_info URL must
8780 // have already been initialized and @a lookup_url must be valid.
8781 auto result = s->cache_info.lookup_url->parse(url, length < 0 ? strlen(url) : length);
8782 if (PARSE_RESULT_DONE == result) {
8783 s->transact_return_point = nullptr;
8784 sm->rewind_state_machine();
8785 return TS_SUCCESS;
8786 }
8787 return TS_ERROR;
8788}
8789
8790namespace
8791{

Callers 2

Calls 3

sdk_sanity_check_txnFunction · 0.85
rewind_state_machineMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected