| 8768 | } |
| 8769 | |
| 8770 | TSReturnCode |
| 8771 | TSHttpTxnRedoCacheLookup(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 | |
| 8790 | namespace |
| 8791 | { |
no test coverage detected