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

Function TSHttpTxnCacheLookupUrlGet

src/api/InkAPI.cc:4326–4349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4324}
4325
4326TSReturnCode
4327TSHttpTxnCacheLookupUrlGet(TSHttpTxn txnp, TSMBuffer bufp, TSMLoc obj)
4328{
4329 sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
4330 sdk_assert(sdk_sanity_check_mbuffer(bufp) == TS_SUCCESS);
4331 sdk_assert(sdk_sanity_check_url_handle(obj) == TS_SUCCESS);
4332
4333 HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
4334 URL u, *l_url;
4335
4336 u.m_heap = (reinterpret_cast<HdrHeapSDKHandle *>(bufp))->m_heap;
4337 u.m_url_impl = reinterpret_cast<URLImpl *>(obj);
4338 if (!u.valid()) {
4339 return TS_ERROR;
4340 }
4341
4342 l_url = sm->t_state.cache_info.lookup_url;
4343 if (l_url && l_url->valid()) {
4344 u.copy(l_url);
4345 return TS_SUCCESS;
4346 }
4347
4348 return TS_ERROR;
4349}
4350
4351TSReturnCode
4352TSHttpTxnCacheLookupUrlSet(TSHttpTxn txnp, TSMBuffer bufp, TSMLoc obj)

Callers 7

_initializeMethod · 0.85
InjectCacheKeyHeaderFunction · 0.85
appendCacheKeyFunction · 0.85
initializeMethod · 0.85
initFromUrlMethod · 0.85
initializeMethod · 0.85

Calls 5

sdk_sanity_check_txnFunction · 0.85
sdk_sanity_check_mbufferFunction · 0.85
validMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected