| 6489 | } |
| 6490 | |
| 6491 | TSReturnCode |
| 6492 | TSCacheUrlSet(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 | |
| 6515 | void |
| 6516 | TSCacheHttpInfoKeySet(TSCacheHttpInfo infop, TSCacheKey keyp) |
no test coverage detected