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

Function TSCacheUrlSet

src/api/InkAPI.cc:6491–6513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6489}
6490
6491TSReturnCode
6492TSCacheUrlSet(TSHttpTxn txnp, const char *url, int length)
6493{
6494 sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
6495
6496 HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
6497 Dbg(dbg_ctl_cache_url, "[TSCacheUrlSet]");
6498
6499 if (sm->t_state.cache_info.lookup_url == nullptr) {
6500 Dbg(dbg_ctl_cache_url, "[TSCacheUrlSet] changing the cache url to: %s", url);
6501
6502 if (length == -1) {
6503 length = strlen(url);
6504 }
6505
6506 sm->t_state.cache_info.lookup_url_storage.create(nullptr);
6507 sm->t_state.cache_info.lookup_url = &(sm->t_state.cache_info.lookup_url_storage);
6508 sm->t_state.cache_info.lookup_url->parse(url, length);
6509 return TS_SUCCESS;
6510 }
6511
6512 return TS_ERROR;
6513}
6514
6515void
6516TSCacheHttpInfoKeySet(TSCacheHttpInfo infop, TSCacheKey keyp)

Callers 5

setCacheUrlMethod · 0.85
finalizeMethod · 0.85
range_header_checkFunction · 0.85
cache_key_assignMethod · 0.85

Calls 3

sdk_sanity_check_txnFunction · 0.85
createMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected